Migrating to IList from ValList for []any bindings since it is more generic
Publish PHP Package / docker (push) Successful in 7s Details

This commit is contained in:
Pavel Shevaev 2024-12-05 19:37:18 +03:00
parent dd83313a7e
commit 169cd07aaf
2 changed files with 2 additions and 7 deletions

View File

@ -535,7 +535,7 @@ function native_type(\mtgType $type)
if($type instanceof \mtgArrType)
{
if($type->getValue()->getName() == "any")
return "bhl.ValList";
return "IList";
else
return "IList<".native_type($type->getValue()).">";
}

View File

@ -384,16 +384,11 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{%- macro dispose_args(o, arg_prefix = '') -%}
{%- for arg in o.args -%}
{% if arg.type is instanceof('\\mtgArrType') %}
{% if arg.type.value.name == 'any' %}
{{arg_prefix}}{{arg.name}}?.Release();
{{arg_prefix}}{{arg.name}} = default;
{% else %}
{
if({{arg_prefix}}{{arg.name}} is IValRefcounted rfc)
rfc.Release();
{{arg_prefix}}{{arg.name}} = default;
}
{% endif %}
{% endif %}
{% if arg.type.name == 'any' %}
@ -463,7 +458,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{%~ if type == 'any[]'-%}
{{native}} = (ValList){{value}}._obj;
{{native}} = (IList){{value}}._obj;
{%~ else ~%}