# HG changeset patch # User Paul Boddie # Date 1486823670 -3600 # Node ID 7a6d39d57799626081fa524891dedae9bfa09634 # Parent 37cb73adc7c209b7f52b06e9c1d4522e3529144a Changed generated functions to use the specific types for positions. diff -r 37cb73adc7c2 -r 7a6d39d57799 generator.py --- a/generator.py Fri Feb 10 19:31:06 2017 +0100 +++ b/generator.py Sat Feb 11 15:34:30 2017 +0100 @@ -683,7 +683,7 @@ print >>f_decls, """\ typedef struct { const __table * table; - unsigned int pos; + __pos pos; __attr attrs[%s]; } %s; """ % (structure_size, encode_symbol("obj", path)) @@ -1084,7 +1084,7 @@ style = "sequence" print >>f_code, """\ -__attr %s(__attr __args[], unsigned int number) +__attr %s(__attr __args[], __pos number) { /* Allocate the structure. */ __args[0] = __new(&%s, &%s, sizeof(%s)); @@ -1103,7 +1103,7 @@ encode_literal_data_initialiser(style) ) - print >>f_signatures, "__attr %s(__attr[], unsigned int);" % encode_literal_instantiator(path) + print >>f_signatures, "__attr %s(__attr[], __pos);" % encode_literal_instantiator(path) def write_main_program(self, f_code, f_signatures):