summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-03-12 19:19:19 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2020-03-12 19:19:19 +0100
commit979ef7c1c22d899df42d133e89f690b8ee34ee02 (patch)
tree9c63026ea1880fa34b8fea674e5f179ca1c2dc2c /vapigen
parentb893c030da42f73182907044b93e9737b5654bc2 (diff)
downloadvala-979ef7c1c22d899df42d133e89f690b8ee34ee02.tar.gz
vapigen: Define "GOBJECT" corresponding to set profile of CodeContext
This is required to evaluate pre-processor directives correctly in sourced bindings. Fixes https://gitlab.gnome.org/GNOME/vala/issues/933
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valavapigen.vala1
1 files changed, 1 insertions, 0 deletions
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index d98318197..11c02b934 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -76,6 +76,7 @@ class Vala.VAPIGen {
private int run () {
context = new CodeContext ();
context.profile = Profile.GOBJECT;
+ context.add_define ("GOBJECT");
context.vapi_directories = vapi_directories;
context.gir_directories = gir_directories;
context.metadata_directories = metadata_directories;