summaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-08-16 09:36:52 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2017-08-16 09:59:02 +0200
commitf268e5e252a69e75ea2e1ca9ebcd59055f423932 (patch)
tree9c03a36771a8278fb83f143a03f65b9f981e4465 /codegen
parentf9e9cc66e967e3c3bf066b28a33a678abbb215af (diff)
downloadvala-f268e5e252a69e75ea2e1ca9ebcd59055f423932.tar.gz
codegen: Include glib-object.h for Structs with type_id
Diffstat (limited to 'codegen')
-rw-r--r--codegen/valaccodestructmodule.vala1
1 files changed, 1 insertions, 0 deletions
diff --git a/codegen/valaccodestructmodule.vala b/codegen/valaccodestructmodule.vala
index 7d58aeb30..eb52d472e 100644
--- a/codegen/valaccodestructmodule.vala
+++ b/codegen/valaccodestructmodule.vala
@@ -54,6 +54,7 @@ public abstract class Vala.CCodeStructModule : CCodeBaseModule {
}
if (get_ccode_has_type_id (st)) {
+ decl_space.add_include ("glib-object.h");
decl_space.add_type_declaration (new CCodeNewline ());
var macro = "(%s_get_type ())".printf (get_ccode_lower_case_name (st, null));
decl_space.add_type_declaration (new CCodeMacroReplacement (get_ccode_type_id (st), macro));