diff options
| author | amy <[email protected]> | 2025-04-14 14:09:22 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-14 14:09:22 -0500 |
| commit | dd7a8af4050454c3901987bff24a77334f892cc4 (patch) | |
| tree | 48c6107656e14cfbbcbb49424fc3454de850a5db /src/test.c | |
| parent | 44c68aa7d51ea6b50c442bfbfa4ce11c530d2f7d (diff) | |
| parent | dc7e4527e88ed0c59e17c0ff04c01e1c92136e42 (diff) | |
Merge pull request #1 from ameliasquires/new-config
updates how config values are updated, support for local values when copying states, and annotations
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; +} |
