summaryrefslogtreecommitdiff
path: root/codegen/valaccodemethodmodule.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2012-10-19 21:32:04 +0200
committerJürg Billeter <j@bitron.ch>2012-10-19 21:32:23 +0200
commitf1fbafdfdc91fadaa57d2e073fc29cc6804d6ae3 (patch)
tree65f490d61dcdf6ced42c68f29cf273e2ec4a6b14 /codegen/valaccodemethodmodule.vala
parentd087035c2925882bb7274cc2f52f0f438a681c85 (diff)
downloadvala-f1fbafdfdc91fadaa57d2e073fc29cc6804d6ae3.tar.gz
codegen: Do not call g_type_init when targeting GLib >= 2.36
Fixes bug 686222.
Diffstat (limited to 'codegen/valaccodemethodmodule.vala')
-rw-r--r--codegen/valaccodemethodmodule.vala4
1 files changed, 3 insertions, 1 deletions
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) {