[gobject-introspection] Drop calls to g_type_init()



commit 448230b381a6ba0394962ca73f35af563b5de4c9
Author: Colin Walters <walters verbum org>
Date:   Tue Oct 16 10:58:08 2012 -0400

    Drop calls to g_type_init()
    
    And bump our GLib requirement.

 configure.ac                     |    2 +-
 examples/glib-print.c            |    2 --
 girepository/cmph-bdz-test.c     |    1 -
 girepository/gi-dump-types.c     |    2 --
 girepository/gthash-test.c       |    1 -
 giscanner/dumper.py              |    2 ++
 giscanner/giscannermodule.c      |    2 --
 tests/repository/gitestrepo.c    |    2 --
 tests/repository/gitestthrows.c  |    2 --
 tests/repository/gitypelibtest.c |    2 --
 tests/scanner/barapp.c           |    1 -
 tools/compiler.c                 |    2 --
 tools/generate.c                 |    2 --
 13 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 775b50a..e488cea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,7 @@ GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
 AC_SUBST(GIR_DIR)
 AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation])
 
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.29.7])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.35.0])
 PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
 PKG_CHECK_MODULES(GIO, [gio-2.0])
diff --git a/examples/glib-print.c b/examples/glib-print.c
index f187f76..606a29f 100644
--- a/examples/glib-print.c
+++ b/examples/glib-print.c
@@ -8,8 +8,6 @@ int main(void)
     GIArgument in_args[5];
     GIArgument retval;
 
-    g_type_init();
-
     repository = g_irepository_get_default();
     g_irepository_require(repository, "GLib", "2.0", 0, &error);
     if (error) {
diff --git a/girepository/cmph-bdz-test.c b/girepository/cmph-bdz-test.c
index fdff9d1..92c445f 100644
--- a/girepository/cmph-bdz-test.c
+++ b/girepository/cmph-bdz-test.c
@@ -128,7 +128,6 @@ main(int argc, char **argv)
 {
   gint ret;
 
-  g_type_init ();
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/cmph-bdz/search", test_search);
diff --git a/girepository/gi-dump-types.c b/girepository/gi-dump-types.c
index 13e7ae6..69d8b12 100644
--- a/girepository/gi-dump-types.c
+++ b/girepository/gi-dump-types.c
@@ -10,8 +10,6 @@ main (int    argc,
   GOutputStream *stdout;
   GModule *self;
 
-  g_type_init ();
-
   stdout = g_unix_output_stream_new (1, FALSE);
 
   self = g_module_open (NULL, 0);
diff --git a/girepository/gthash-test.c b/girepository/gthash-test.c
index ea811e3..faeb2dc 100644
--- a/girepository/gthash-test.c
+++ b/girepository/gthash-test.c
@@ -56,7 +56,6 @@ test_build_retrieve (void)
 int
 main(int argc, char **argv)
 {
-  g_type_init ();
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/gthash/build-retrieve", test_build_retrieve);
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index f78d2ae..04c1f62 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -45,7 +45,9 @@ main(int argc, char **argv)
   GError *error = NULL;
   const char *introspect_dump_prefix = "--introspect-dump=";
 
+#if !GLIB_CHECK_VERSION(2,35,0)
   g_type_init ();
+#endif
 
   %(init_sections)s
 
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c
index 0da20f1..ad8f4bd 100644
--- a/giscanner/giscannermodule.c
+++ b/giscanner/giscannermodule.c
@@ -722,8 +722,6 @@ init_giscanner(void)
     PyObject *m, *d;
     gboolean is_uninstalled;
 
-    g_type_init ();
-
     /* Hack to avoid having to create a fake directory structure; when
      * running uninstalled, the module will be in the top builddir,
      * with no _giscanner prefix.
diff --git a/tests/repository/gitestrepo.c b/tests/repository/gitestrepo.c
index 05ea5d9..b122a63 100644
--- a/tests/repository/gitestrepo.c
+++ b/tests/repository/gitestrepo.c
@@ -48,8 +48,6 @@ main(int argc, char **argv)
   GType gtype;
   const char *prefix;
 
-  g_type_init ();
-
   repo = g_irepository_get_default ();
 
   ret = g_irepository_require (repo, "Gio", NULL, 0, &error);
diff --git a/tests/repository/gitestthrows.c b/tests/repository/gitestthrows.c
index cce0684..a045a81 100644
--- a/tests/repository/gitestthrows.c
+++ b/tests/repository/gitestthrows.c
@@ -16,8 +16,6 @@ main(int argc, char **argv)
   GError *error;
   gboolean invoke_return;
 
-  g_type_init ();
-
   repo = g_irepository_get_default ();
 
   error = NULL;
diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
index 7068ef3..3677073 100644
--- a/tests/repository/gitypelibtest.c
+++ b/tests/repository/gitypelibtest.c
@@ -183,8 +183,6 @@ main(int argc, char **argv)
 {
     GIRepository *repo;
 
-    g_type_init ();
-
     repo = g_irepository_get_default ();
 
     /* do tests */
diff --git a/tests/scanner/barapp.c b/tests/scanner/barapp.c
index db4be8d..ed39120 100644
--- a/tests/scanner/barapp.c
+++ b/tests/scanner/barapp.c
@@ -54,7 +54,6 @@ main(int argc, char **argv)
       g_printerr ("usage: barapp --introspect-dump=types.txt,out.xml\\n");
       return 1;
     }
-  g_type_init ();
 
   if (!g_irepository_dump (argv[1] + strlen (prefix), &error))
     {
diff --git a/tools/compiler.c b/tools/compiler.c
index 7e17f1b..f8e8a90 100644
--- a/tools/compiler.c
+++ b/tools/compiler.c
@@ -174,8 +174,6 @@ main (int argc, char ** argv)
   g_debug ("[parsing] start, %d includes", 
 	   includedirs ? g_strv_length (includedirs) : 0);
 
-  g_type_init ();
-
   if (includedirs != NULL)
     for (i = 0; includedirs[i]; i++)
       g_irepository_prepend_search_path (includedirs[i]);
diff --git a/tools/generate.c b/tools/generate.c
index 0426512..3e31097 100644
--- a/tools/generate.c
+++ b/tools/generate.c
@@ -52,8 +52,6 @@ main (int argc, char *argv[])
 
   g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL);
 
-  g_type_init ();
-
   g_typelib_check_sanity ();
 
   context = g_option_context_new ("");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]