aboutsummaryrefslogtreecommitdiff
path: root/src/lua.h
diff options
context:
space:
mode:
authorame <[email protected]>2025-06-12 02:10:10 -0500
committerame <[email protected]>2025-06-12 02:10:10 -0500
commit8e7257aac8b30aaa57577770fd636e784361e35d (patch)
tree71f7cb33f56a455bac2734bd53b483aa8bb7b27b /src/lua.h
parenta2e8051d4cf6e46310e2e8aab83fee991560d8c0 (diff)
fix some net code, add streaming to some requests
Diffstat (limited to 'src/lua.h')
-rw-r--r--src/lua.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua.h b/src/lua.h
index 9f28c06..a88f005 100644
--- a/src/lua.h
+++ b/src/lua.h
@@ -2,6 +2,8 @@
#include <lualib.h>
#include <lauxlib.h>
#include <stdlib.h>
+#include <stdint.h>
+#include "types/str.h"
#ifndef __lua_h
#define __lua_h
@@ -31,6 +33,10 @@ void luaI_copyvars(lua_State* src, lua_State* dest);
void lua_upvalue_key_table(lua_State* L, int fidx);
int lua_assign_upvalues(lua_State* L, int fidx);
+typedef int (*stream_read_function)(uint64_t, str**, void**);
+typedef int (*stream_free_function)(void**);
+void luaI_newstream(lua_State* L, stream_read_function, stream_free_function, void*);
+
//generic macro that takes other macros (see below)
#define _tset_b(L, Tidx, K, V, F)\
lua_pushstring(L, K);\