Skip to content

Commit

Permalink
glib2: fix parser in MkEnums for resent GLib
Browse files Browse the repository at this point in the history
GLib 2.62.0 introduced some deprecation warnings for macros in gtestutils.h with the commit https://gitlab.gnome.org/GNOME/glib/commit/40ff4759774516b7dff3b07303a98fc1626b2d0e .
This patch makes GLib::MkEnums correctly parse header files in GLib 2.62.0 again.
  • Loading branch information
mtasaka authored and kou committed Sep 8, 2019
1 parent 937dc76 commit f34f99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glib2/lib/glib-mkenums.rb
Expand Up @@ -112,7 +112,7 @@ def self.parse(data, g_type_prefix, options={})
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+);/mx) do |force_flags, constants, name|
\}\s*(\w+)\s*([\w\(\)]*);/mx) do |force_flags, constants, name, deprecation_flag|
enum_options = {}
enum_options[:force_flags] = !force_flags.nil?
force_flags_patterns = [(options[:force_flags] || [])].flatten
Expand Down

0 comments on commit f34f99f

Please sign in to comment.