From ccb46db89ccc20a4963329baa9250bd2628d6b32 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 19 Mar 2025 16:25:46 -0400 Subject: Fix for cached function args --- compile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compile.c b/compile.c index 1dd9b3b7..73d5ebfe 100644 --- a/compile.c +++ b/compile.c @@ -4160,11 +4160,10 @@ CORD compile_function(env_t *env, CORD name_code, ast_t *ast, CORD *staticdefs) int64_t num_fields = used_names.entries.length; const char *metamethods = is_packed_data(t) ? "PackedData$metamethods" : "Struct$metamethods"; - CORD args_typeinfo = CORD_asprintf("((TypeInfo_t[1]){{.size=sizeof(%r), .align=__alignof__(%r), .metamethods=%s, " + CORD args_typeinfo = CORD_asprintf("((TypeInfo_t[1]){{.size=sizeof(args), .align=__alignof__(args), .metamethods=%s, " ".tag=StructInfo, .StructInfo.name=\"FunctionArguments\", " ".StructInfo.num_fields=%ld, .StructInfo.fields=(NamedType_t[%ld]){", - compile_type(t), compile_type(t), metamethods, - num_fields, num_fields); + metamethods, num_fields, num_fields); CORD args_type = "struct { "; for (arg_t *f = fields; f; f = f->next) { args_typeinfo = CORD_all(args_typeinfo, "{\"", f->name, "\", ", compile_type_info(f->type), "}"); -- cgit v1.2.3