# HG changeset patch # User Paul Boddie # Date 1477829623 -3600 # Node ID ac6bfeeb707da2822fafc96288c09db218d5d640 # Parent a32be37ae7dc5e6a6f6203b1b67dba37df5a97f3 Generate function instance structure declarations for functions having defaults. diff -r a32be37ae7dc -r ac6bfeeb707d generator.py --- a/generator.py Sun Oct 30 01:16:02 2016 +0200 +++ b/generator.py Sun Oct 30 13:13:43 2016 +0100 @@ -279,6 +279,11 @@ structure = self.populate_function(path, function_instance_attrs, False) self.write_structure(f_decls, f_defs, path, table_name, structure_size, structure) + # Functions with defaults need to declare instance structures. + + if self.importer.function_defaults.get(path): + self.write_instance_structure(f_decls, path, structure_size) + # Write function declarations. # Signature: __attr (__attr[]);