diff options
| author | amelia squires <[email protected]> | 2025-04-14 14:03:08 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-04-14 14:03:08 -0500 |
| commit | dc7e4527e88ed0c59e17c0ff04c01e1c92136e42 (patch) | |
| tree | 48c6107656e14cfbbcbb49424fc3454de850a5db /src/test.c | |
| parent | 9c3eea30aeb3c13b6df2288fbd086756a217a04b (diff) | |
config change, local support, overall fixes
Diffstat (limited to 'src/test.c')
| -rw-r--r-- | src/test.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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; +} |
