[vala/staging: 2/4] vala: Fix build with valac < 0.44
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/4] vala: Fix build with valac < 0.44
- Date: Wed, 3 Mar 2021 16:49:39 +0000 (UTC)
commit 111d17e0b0d8cce55d0c7da30c30c16c510d92b6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Mar 3 17:37:04 2021 +0100
vala: Fix build with valac < 0.44
vala/valacodecontext.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index 9e78cc0c8..dc1421e6c 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -632,7 +632,8 @@ public class Vala.CodeContext {
if (target_glib == "auto") {
var available_glib = pkg_config_modversion ("glib-2.0");
if (available_glib != null && available_glib.scanf ("%d.%d", out glib_major, out
glib_minor) >= 2) {
- glib_minor -= ++glib_minor % 2;
+ glib_minor++;
+ glib_minor -= glib_minor % 2;
set_target_glib_version ("%d.%d".printf (glib_major, glib_minor));
} else {
Report.warning (null, "Could not determine the version of `glib-2.0', target
version of glib was not set");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]