From: Rico Tzschichholz Date: Thu, 19 Mar 2020 17:24:16 +0000 (+0100) Subject: codegen: Include "glib.h" for g_return_*() usage X-Git-Tag: 0.48.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6241e0523461c9af5d1f0881ec4c0087bcdab522;p=thirdparty%2Fvala.git codegen: Include "glib.h" for g_return_*() usage Fixes https://gitlab.gnome.org/GNOME/vala/issues/940 --- diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala index 59af90144..5632b82a4 100644 --- a/codegen/valagtypemodule.vala +++ b/codegen/valagtypemodule.vala @@ -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");