From 5d0aa577d6a359906d515e12a0a0508a82644f08 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 25 May 2026 17:26:55 +0100 Subject: [PATCH] fx.reflection: fix fx_string type marshalling --- fx.reflection/function.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fx.reflection/function.c b/fx.reflection/function.c index eae7c0c..d907a89 100644 --- a/fx.reflection/function.c +++ b/fx.reflection/function.c @@ -75,8 +75,9 @@ static void push_arg( unsigned int param_value_type = __fx_type_get_value_type(param_type); if (param_value_type == __FX_VALUE_TYPE_CSTR && fx_value_is_type(arg, FX_TYPE_STRING)) { - fx_value cstr = FX_CSTR( - fx_string_get_cstr(fx_value_get_object_c(arg))); + fx_object *obj; + fx_value_get_object(arg, &obj); + fx_value cstr = FX_CSTR(fx_string_get_cstr(obj)); callvm_push(vm, &cstr); return; } @@ -227,8 +228,7 @@ static void function_fini(fx_object *obj, void *priv) } } -/*** CLASS DEFINITION - * *********************************************************/ +/*** CLASS DEFINITION *********************************************************/ FX_TYPE_CLASS_BEGIN(fx_function) FX_TYPE_VTABLE_INTERFACE_BEGIN(fx_object, FX_TYPE_OBJECT)