diff --git a/tpl/macro.twig b/tpl/macro.twig index 1523834..6c81209 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -119,7 +119,7 @@ stack, Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, args_info) ); - return null + return null; } #else null @@ -143,7 +143,7 @@ stack, Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, args_info) ); - return null + return null; } #else null @@ -207,7 +207,7 @@ {% endif %} {% endfor %} - {{ _self.read_args2natives(o, 'args.', this_type) }} + {{ _self.read_args2natives(o, 'args.', this_type, false) }} return args; } {%- endmacro -%} @@ -249,8 +249,11 @@ {%- endfor ~%} {%- endmacro -%} -{%- macro read_args2natives(o, arg_prefix, this_type = null) -%} +{%- macro read_args2natives(o, arg_prefix, this_type = null, declare_locals = true) -%} + + {%- if declare_locals -%} {{ _self.local_native_vars(o.args, arg_prefix) }} + {%- endif -%} {# traversing args in reverse order #} {%- set default_counter = 0 -%} @@ -349,7 +352,7 @@ for(int i=0;i