From 98d81e701a3e6c75b932ac75c872ae0e3f4d84f4 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 14 Apr 2025 14:03:08 -0500 Subject: config change, local support, overall fixes --- src/test.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/test.c') diff --git a/src/test.c b/src/test.c index 4b52753..4403e60 100644 --- a/src/test.c +++ b/src/test.c @@ -4,7 +4,7 @@ int ld_match(lua_State* L){ parray_t* a = parray_init(); - int o = match_param(lua_tostring(L, 1), lua_tostring(L, 2), a); + int o = match_param((char*)lua_tostring(L, 1), (char*)lua_tostring(L, 2), a); if(o == 0){ lua_pushinteger(L, o); @@ -36,12 +36,13 @@ int l_stack_dump(lua_State* L){ //printf("%i\n", level); lua_Debug info; - for(int i = 0; ; i++){ + for(int i = 0;; i++){ if(lua_getstack(L, i, &info) == 0) break; for(int idx = 1;; idx++){ const char* name = lua_getlocal(L, &info, idx); if(name == NULL) break; - printf("l:%i | %s = %s %s\n", i, name, lua_tostring(L, -1), lua_typename(L, lua_type(L, -1))); + const char* type = lua_typename(L, lua_type(L, -1)); + printf("l:%i | %s = %s (%s)\n", i, name, lua_tostring(L, -1), type); lua_pop(L, 1); } } @@ -49,3 +50,8 @@ int l_stack_dump(lua_State* L){ //const char* name = lua_getlocal(L, &info, 2); return 0; } + +int l_upvalue_key_table(lua_State* L){ + lua_upvalue_key_table(L, 1); + return 1; +} -- cgit v1.2.3