mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-31 09:50:05 +02:00
Allow whitespace between marshallers list tokens
Some (older) list files use whitespace, and we need to take that into account when splitting off the various tokens.
This commit is contained in:
parent
cf7ee86b97
commit
c6793d1cfb
@ -962,7 +962,7 @@ if __name__ == '__main__':
|
||||
if line == '\n' or line.startswith('#'):
|
||||
continue
|
||||
|
||||
matches = re.match(r'^([A-Z0-9]+):([A-Z0-9,]+)$', line.strip())
|
||||
matches = re.match(r'^([A-Z0-9]+)\s?:\s?([A-Z0-9,\s]+)$', line.strip())
|
||||
if not matches or len(matches.groups()) != 2:
|
||||
print_warning('Invalid entry: "{}"'.format(line.strip()), args.fatal_warnings)
|
||||
continue
|
||||
@ -972,8 +972,8 @@ if __name__ == '__main__':
|
||||
else:
|
||||
location = None
|
||||
|
||||
retval = matches.group(1)
|
||||
params = matches.group(2).split(',')
|
||||
retval = matches.group(1).strip()
|
||||
params = [x.strip() for x in matches.group(2).split(',')]
|
||||
check_args(retval, params, args.fatal_warnings)
|
||||
|
||||
raw_marshaller = generate_marshaller_name(args.prefix, retval, params, False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user