From 7f16daed2792984d81184cd3ce9b97e129b279a1 Mon Sep 17 00:00:00 2001 From: pancake Date: Sat, 31 Oct 2020 01:25:00 +0100 Subject: [PATCH] Fix build for vala-0.50 --- valabindwriter.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/valabindwriter.vala b/valabindwriter.vala index 165cdf5..5b71abd 100644 --- a/valabindwriter.vala +++ b/valabindwriter.vala @@ -30,10 +30,14 @@ public class ValabindWriter : CodeVisitor { add_package (context, "glib-2.0"); add_package (context, "gobject-2.0"); /* vala 0.17 only support gobject profile */ - if (glibmode) + if (glibmode) { context.add_define ("GOBJECT"); + } +#if VALA_0_50 // required to avoid ugly runtime errors +#else context.profile = Profile.GOBJECT; +#endif } public void parse () {