From: Jürg Billeter Date: Fri, 19 Oct 2012 19:32:04 +0000 (+0200) Subject: codegen: Do not call g_type_init when targeting GLib >= 2.36 X-Git-Tag: 0.19.0~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1fbafdfdc91fadaa57d2e073fc29cc6804d6ae3;p=thirdparty%2Fvala.git codegen: Do not call g_type_init when targeting GLib >= 2.36 Fixes bug 686222. --- diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala index d6b8cf421..12298b3a5 100644 --- a/codegen/valaccodemethodmodule.vala +++ b/codegen/valaccodemethodmodule.vala @@ -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) {