Drop calls to g_type_init()
authorColin Walters <walters@verbum.org>
Tue, 16 Oct 2012 14:58:08 +0000 (10:58 -0400)
committerColin Walters <walters@verbum.org>
Tue, 16 Oct 2012 14:58:08 +0000 (10:58 -0400)
And bump our GLib requirement.

13 files changed:
configure.ac
examples/glib-print.c
girepository/cmph-bdz-test.c
girepository/gi-dump-types.c
girepository/gthash-test.c
giscanner/dumper.py
giscanner/giscannermodule.c
tests/repository/gitestrepo.c
tests/repository/gitestthrows.c
tests/repository/gitypelibtest.c
tests/scanner/barapp.c
tools/compiler.c
tools/generate.c

index 775b50a..e488cea 100644 (file)
@@ -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])
index f187f76..606a29f 100644 (file)
@@ -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) {
index fdff9d1..92c445f 100644 (file)
@@ -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);
index 13e7ae6..69d8b12 100644 (file)
@@ -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);
index ea811e3..faeb2dc 100644 (file)
@@ -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);
index f78d2ae..04c1f62 100644 (file)
@@ -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
 
index 0da20f1..ad8f4bd 100644 (file)
@@ -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.
index 05ea5d9..b122a63 100644 (file)
@@ -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);
index cce0684..a045a81 100644 (file)
@@ -16,8 +16,6 @@ main(int argc, char **argv)
   GError *error;
   gboolean invoke_return;
 
-  g_type_init ();
-
   repo = g_irepository_get_default ();
 
   error = NULL;
index 7068ef3..3677073 100644 (file)
@@ -183,8 +183,6 @@ main(int argc, char **argv)
 {
     GIRepository *repo;
 
-    g_type_init ();
-
     repo = g_irepository_get_default ();
 
     /* do tests */
index db4be8d..ed39120 100644 (file)
@@ -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))
     {
index 7e17f1b..f8e8a90 100644 (file)
@@ -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]);
index 0426512..3e31097 100644 (file)
@@ -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 ("");