diff --git a/src/bind.inc.php b/src/bind.inc.php index 07ed464..d76cbd2 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -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()).">"; } diff --git a/tpl/bhl_bind_macro.twig b/tpl/bhl_bind_macro.twig index 6708b7c..f5a2b3d 100644 --- a/tpl/bhl_bind_macro.twig +++ b/tpl/bhl_bind_macro.twig @@ -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 ~%}