]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Do not call g_type_init when targeting GLib >= 2.36
authorJürg Billeter <j@bitron.ch>
Fri, 19 Oct 2012 19:32:04 +0000 (21:32 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 19 Oct 2012 19:32:23 +0000 (21:32 +0200)
Fixes bug 686222.

codegen/valaccodemethodmodule.vala

index d6b8cf421250c612e56ceae6f99fd3370828dfea..12298b3a5796053f14acb9cd1d856fd1a90058ca 100644 (file)
@@ -841,7 +841,9 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                ccode.add_expression (thread_init_call);
                        }
 
-                       ccode.add_expression (new CCodeFunctionCall (new CCodeIdentifier ("g_type_init")));
+                       if (!context.require_glib_version (2, 36)) {
+                               ccode.add_expression (new CCodeFunctionCall (new CCodeIdentifier ("g_type_init")));
+                       }
 
                        var main_call = new CCodeFunctionCall (new CCodeIdentifier (function.name));
                        if (m.get_parameters ().size == 1) {