]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Include "glib.h" for g_return_*() usage
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 19 Mar 2020 17:24:16 +0000 (18:24 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 24 Mar 2020 08:50:25 +0000 (09:50 +0100)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/940

codegen/valagtypemodule.vala

index d4e0f3eece2791309a5f1c74babd054194aa13ca..dbdc7caf3936c8fcdd521c328bb872878fb34d68 100644 (file)
@@ -2477,6 +2477,9 @@ public class Vala.GTypeModule : GErrorModule {
                        ccheck.add_argument (cnonnull);
                }
 
+               // g_return_* needs glib.h
+               cfile.add_include ("glib.h");
+
                var cm = method_node as CreationMethod;
                if (cm != null && cm.parent_symbol is ObjectTypeSymbol) {
                        ccheck.call = new CCodeIdentifier ("g_return_val_if_fail");