# HG changeset patch # User Paul Boddie # Date 1486938208 -3600 # Node ID 7185fb95c3bc88f0eec78b978311eecf3fc26cbe # Parent afe747e589b31538af82eeea8ebb56cef6e0d7f0 Eliminated code previously used to generate method alternatives. diff -r afe747e589b3 -r 7185fb95c3bc generator.py --- a/generator.py Sun Feb 12 01:21:33 2017 +0100 +++ b/generator.py Sun Feb 12 23:23:28 2017 +0100 @@ -272,26 +272,8 @@ function_instance_attrs["__fn__"] = path function_instance_attrs["__args__"] = encode_size("pmin", path) - # Produce two structures where a method is involved. - - parent, name = path.rsplit(".", 1) - parent_ref = self.importer.get_object(parent) - parent_kind = parent_ref and parent_ref.get_kind() - - # Populate and write each structure. - - if parent_kind == "": - - # A method. - - structure = self.populate_function(path, function_instance_attrs) - self.write_structure(f_decls, f_defs, path, table_name, structure) - - else: - # A normal function. - - structure = self.populate_function(path, function_instance_attrs) - self.write_structure(f_decls, f_defs, path, table_name, structure) + structure = self.populate_function(path, function_instance_attrs) + self.write_structure(f_decls, f_defs, path, table_name, structure) # Functions with defaults need to declare instance structures.