aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorame <[email protected]>2024-04-23 07:22:26 -0500
committerame <[email protected]>2024-04-23 07:22:26 -0500
commit15a906def7194e84ea151f6bf1972fc7c1986fd4 (patch)
tree9d88e3cf10eea307200969d8ec3dd45e79c6409c /src
parenta761abf2676cce6d63b5a5b94905b286a93472eb (diff)
io stuff
Diffstat (limited to 'src')
-rw-r--r--src/io.c9
-rw-r--r--src/net.c1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 0440c1d..36561d1 100644
--- a/src/io.c
+++ b/src/io.c
@@ -1,4 +1,5 @@
#include <unistd.h>
+#include "lua5.4/lua.h"
#include "types/str.h"
#include "io.h"
#include "stdlib.h"
@@ -138,6 +139,14 @@ void i_pprint(lua_State* L, int indent, int skip_indent){
if(!skip_indent) print_indentation(indent);
printf(color_yellow"(%p)"color_reset, lua_topointer(L, -1));
break;
+ case LUA_TUSERDATA:
+ if(!skip_indent) print_indentation(indent);
+ printf(color_yellow"(ud,%p)"color_reset, lua_touserdata(L,-1));
+ break;
+ case LUA_TLIGHTUSERDATA:
+ if(!skip_indent) print_indentation(indent);
+ printf(color_yellow"(lud,%p)"color_reset, lua_topointer(L,-1));
+ break;
default:
if(!skip_indent) print_indentation(indent);
printf(color_yellow"%s"color_reset, lua_tostring(L,-1));
diff --git a/src/net.c b/src/net.c
index fadad1c..14882f8 100644
--- a/src/net.c
+++ b/src/net.c
@@ -819,6 +819,7 @@ void* handle_client(void *_arg){
int res_idx = lua_gettop(L);
//handle cookies
+ //TODO: enable and test with valgrind
if(0 && sC != NULL){
lua_newtable(L);
int lcookie = lua_gettop(L);