1.1 --- a/generator.py Sat Feb 11 16:04:40 2017 +0100
1.2 +++ b/generator.py Sat Feb 11 23:15:21 2017 +0100
1.3 @@ -650,9 +650,14 @@
1.4
1.5 # Write the corresponding definition.
1.6
1.7 - print >>f_defs, "const __table %s = {\n %s,\n {\n %s\n }\n };\n" % (
1.8 - table_name, structure_size,
1.9 - ",\n ".join(table))
1.10 + print >>f_defs, """\
1.11 +const __table %s = {
1.12 + %s,
1.13 + {
1.14 + %s
1.15 + }
1.16 +};
1.17 +""" % (table_name, structure_size, ",\n ".join(table))
1.18
1.19 def write_parameter_table(self, f_decls, f_defs, table_name, structure_size, table):
1.20
1.21 @@ -662,13 +667,22 @@
1.22 with 'table' details used to populate the definition.
1.23 """
1.24
1.25 + members = []
1.26 + for t in table:
1.27 + members.append("{%s, %s}" % t)
1.28 +
1.29 print >>f_decls, "extern const __ptable %s;\n" % table_name
1.30
1.31 # Write the corresponding definition.
1.32
1.33 - print >>f_defs, "const __ptable %s = {\n %s,\n {\n %s\n }\n };\n" % (
1.34 - table_name, structure_size,
1.35 - ",\n ".join([("{%s, %s}" % t) for t in table]))
1.36 + print >>f_defs, """\
1.37 +const __ptable %s = {
1.38 + %s,
1.39 + {
1.40 + %s
1.41 + }
1.42 +};
1.43 +""" % (table_name, structure_size, ",\n ".join(members))
1.44
1.45 def write_instance_structure(self, f_decls, path, structure_size):
1.46