glib-mkenums: Fix parsing of multiline comments

... in glib-mkenums python port.

https://bugzilla.gnome.org/show_bug.cgi?id=779332
https://bugzilla.gnome.org/show_bug.cgi?id=783198
This commit is contained in:
Matej Knopp 2017-05-28 22:29:20 +02:00 committed by Matthias Clasen
parent 69bfd1a771
commit 29f9fe041b

View File

@ -64,7 +64,7 @@ def parse_entries(file, file_name):
for line in file:
# read lines until we have no open comments
while re.search(r'/\*([^*]|\*(?!/))*$', line):
line = file.readline()
line += file.readline()
# strip comments w/o options
line = re.sub(r'''/\*(?!<)
@ -315,7 +315,7 @@ def process_file(curfilename):
for line in curfile:
# read lines until we have no open comments
while re.search(r'/\*([^*]|\*(?!/))*$', line):
line = curfile.readline()
line += curfile.readline()
# strip comments w/o options
line = re.sub(r'''/\*(?!<)