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

codegen/valagtypemodule.vala

index 59af901448dc7f8179fdfb536042cdb29cb66688..5632b82a48177ef77107c2a64116bcf7807955d3 100644 (file)
@@ -2370,6 +2370,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");