diff options
author | Sam Spilsbury <sam@endlessm.com> | 2018-03-19 04:56:17 +0800 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2018-03-21 15:12:47 +0000 |
commit | 145e45f55d56caaabe33285e410a3b2105a9306c (patch) | |
tree | 4ad34080a04e48b98921637dca2d0233e5452653 | |
parent | 09f3918952246fffdc3e8482df88c9e842368cbc (diff) | |
download | glib-145e45f55d56caaabe33285e410a3b2105a9306c.tar.gz |
glib-mkenums: Don't treat typedef enum _SomeIdentifier {} as syntax error
Previously we were only detecting typedef\*senum\s*\{, which does not
handle the case where there is an entifier for the enum itself but
not the typedef. glib-mkenums would then attempt to read the next line
looking for a matching {, but in vain.
https://bugzilla.gnome.org/show_bug.cgi?id=794506
-rwxr-xr-x | gobject/glib-mkenums.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index d551cdcf4..57b041208 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -457,7 +457,7 @@ def process_file(curfilename): if re.match(r'\s*typedef\s+enum.*;', line): continue - m = re.match(r'''\s*typedef\s+enum\s* + m = re.match(r'''\s*typedef\s+enum\s*[_A-Za-z]*[_A-Za-z0-9]*\s* ({)?\s* (?:/\*< (([^*]|\*(?!/))*) |