From 8891c340a89581539ca7a5977fddfaf79f4b653f Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 23 May 2023 12:54:27 +0300 Subject: [PATCH] Better support for metagen interfaces --- tpl/macro.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 11bed7e..925950b 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -684,7 +684,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- macro reg_interface(o, scope = 'types.ns') ~%} { - var ifs = new InterfaceSymbolNative("{{o.name|ns_last}}", null + var ifs = new InterfaceSymbolNative(new Origin(), "{{o.name|ns_last}}", null {% for m in o.getfuncs %} , new FuncSymbolNative(new Origin(), "{{m.name}}", {{m.returntype|bhl_type_ref}}, 0, null) @@ -692,6 +692,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {% endfor %} ); + ifs.Setup(); {{scope}}.{{o.name|ns_prefix}}Define(ifs); }