diff --git a/codegenplug/symbols/structmodule.vala b/codegenplug/symbols/structmodule.vala index 362dd846..fde026b0 100644 --- a/codegenplug/symbols/structmodule.vala +++ b/codegenplug/symbols/structmodule.vala @@ -81,6 +81,8 @@ public class codegenplug.StructModule : shotodolplug.Module { decl_space.add_type_definition (instance_struct); var func_macro = new CCodeMacroReplacement("%s(x,xindex,y,yindex)".printf(resolve.get_ccode_free_function(st)), "({%s(x,xindex,y,yindex);})".printf(resolve.get_ccode_copy_function(st))); decl_space.add_type_declaration (func_macro); + var dup_func_macro = new CCodeMacroReplacement("%s(x)".printf(resolve.get_ccode_dup_function(st)), "({x;})"); + decl_space.add_type_declaration (dup_func_macro); } void generate_struct_copy_function (Struct st) {