From d5e8a9fe588d78c0d09d42cdf1d2bb1ba24f20df Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Fri, 22 Nov 2024 18:15:14 +0300 Subject: [PATCH] A bit optimizing setters/getters codegen --- tpl/bhl_bind_macro.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tpl/bhl_bind_macro.twig b/tpl/bhl_bind_macro.twig index dcb99bb..cc26094 100644 --- a/tpl/bhl_bind_macro.twig +++ b/tpl/bhl_bind_macro.twig @@ -802,7 +802,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- elseif has_token(o, 'bhl_blob') ~%} ref var f = ref ctx.GetBlob<{{class}}>(); {%- else ~%} - var f = ({{class}})ctx.obj; + var f = ({{class}})ctx._obj; {%- endif ~%} {% if token(f, 'bhl_set') == 2 %} @@ -821,7 +821,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%~ elseif has_token(o, 'bhl_blob') ~%} //nothing for blob {%- else ~%} - ctx.SetObj(f, ctx.type); + ctx._obj = f; {%- endif ~%} #endif }