Adding Release() codegen for func ptrs for passed args disposing
Publish PHP Package / docker (push) Successful in 6s
Details
Publish PHP Package / docker (push) Successful in 6s
Details
This commit is contained in:
parent
5f9d155d1f
commit
d8c72c3e99
|
@ -379,6 +379,10 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
|
|||
{{arg_prefix}}{{arg.name}} = default;
|
||||
{% endif %}
|
||||
|
||||
{%- if arg.type is instanceof('\\mtgMetaFunc') -%}
|
||||
{{arg_prefix}}{{arg.name}}?.Release();
|
||||
{{arg_prefix}}{{arg.name}} = default;
|
||||
{% endif %}
|
||||
|
||||
{%- endfor ~%}
|
||||
{%- endmacro -%}
|
||||
|
@ -425,11 +429,12 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
|
|||
{{native}} = {{value}}
|
||||
{# bhl functor special case #}
|
||||
{%- elseif type == "ConfScript" -%}
|
||||
{{native}}.fct.obj = {{value}}.obj
|
||||
{{native}}.fct.obj = {{value}}._obj
|
||||
{%- else -%}
|
||||
|
||||
{%- if type is instanceof('\\mtgMetaFunc') -%}
|
||||
{{native}} = (VM.FuncPtr){{value}}.obj;{{native}}.Retain()
|
||||
{{native}} = (VM.FuncPtr){{value}}._obj;
|
||||
{{native}}.Retain()
|
||||
{%- endif -%}
|
||||
|
||||
{%- if type is instanceof('\\mtgArrType') -%}
|
||||
|
@ -439,7 +444,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
|
|||
{%~ if type == 'any[]'-%}
|
||||
|
||||
{{native}} = (ValList){{value}}._obj;
|
||||
{{native}}.Retain();
|
||||
{{native}}.Retain()
|
||||
|
||||
{%~ else ~%}
|
||||
|
||||
|
|
Loading…
Reference in New Issue