# potential issues with attempting to malloc space for zero-length
# structs in C, and also incompatibility with C++ (where an empty
# struct is size 1).
- if not (base and base.members) and not members and not variants:
+ if (not base or base.is_empty()) and not members and not variants:
ret += mcgen('''
char qapi_dummy_for_empty_struct;
''')
do_builtins = False
(input_file, output_dir, do_c, do_h, prefix, opts) = \
- parse_command_line("b", ["builtins"])
+ parse_command_line('b', ['builtins'])
for o, a in opts:
- if o in ("-b", "--builtins"):
+ if o in ('-b', '--builtins'):
do_builtins = True
c_comment = '''