1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: Alessandro Astone <alessandro.astone@canonical.com>
Date: Thu, 5 Feb 2026 15:07:09 +0100
Subject: mkenums: Adapt to new attribute in GLib 2.87
In GLib change https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4900
a new attribute G_GNUC_FLAG_ENUM is placed in between the enum definition
and the typedef name. Adapt the parser to this change.
Forwarded: https://github.com/ruby-gnome/ruby-gnome/pull/1695
---
glib2/lib/glib-mkenums.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/glib2/lib/glib-mkenums.rb b/glib2/lib/glib-mkenums.rb
index 1f83839..0706abe 100644
--- a/glib2/lib/glib-mkenums.rb
+++ b/glib2/lib/glib-mkenums.rb
@@ -112,7 +112,9 @@ GType #{@enum_name}_get_type (void);
data.force_encoding("utf-8") if data.respond_to?(:force_encoding)
data.scan(/^\s*typedef\s+enum\s*(\/\*<\s*flags\s*>\*\/)?\s*
\{?\s*(.*?)
- \}\s*(\w+)
+ \}\s*
+ (?:G_GNUC_FLAG_ENUM\s+)?
+ (\w+)
# GLIB_DEPRECATED_TYPE_IN_2_38_FOR(GTestSubprocessFlags)
(?:\s+[\w()\s]+)?
;/mx) do |force_flags, constants, name|
|