Improving support for native types

This commit is contained in:
Pavel Shevaev 2023-09-05 19:34:39 +03:00
parent aec19d6613
commit f9f382c23d
1 changed files with 10 additions and 4 deletions

View File

@ -614,10 +614,10 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{% endif %}
#endif
}
{% endif ~%}
#if !BHL_FRONT
, native_type: typeof({{token_or(o, 'bhl_native_class', o.name)}})
#endif
{% endif ~%}
);
{{scope}}.{{o.name|ns_prefix}}Define(cl);
@ -709,12 +709,18 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{%- macro reg_interface(o, scope = 'types.ns') ~%}
{
var ifs = new InterfaceSymbolNative(new Origin(), "{{o.name|ns_last}}", null
var ifs = new InterfaceSymbolNative(new Origin(), "{{o.name|ns_last}}", proxy_inherits: null
#if !BHL_FRONT
, native_type: typeof({{token_or(o, 'bhl_native_class', o.name)}})
#else
, native_type: null
#endif
, funcs: new FuncSymbol[] {
{% for m in o.getfuncs %}
, {{ _self.func_native(m, '__self.', o) }}
{{ _self.func_native(m, '__self.', o) }},
{% endfor %}
}
);
{{scope}}.{{o.name|ns_prefix}}Define(ifs);
}