aboutsummaryrefslogtreecommitdiff
path: root/src/test.c
diff options
context:
space:
mode:
authoramelia squires <[email protected]>2025-04-14 14:03:08 -0500
committeramelia squires <[email protected]>2025-04-14 14:03:08 -0500
commitdc7e4527e88ed0c59e17c0ff04c01e1c92136e42 (patch)
tree48c6107656e14cfbbcbb49424fc3454de850a5db /src/test.c
parent9c3eea30aeb3c13b6df2288fbd086756a217a04b (diff)
config change, local support, overall fixes
Diffstat (limited to 'src/test.c')
-rw-r--r--src/test.c12
1 files changed, 9 insertions, 3 deletions
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;
+}