From 8e7257aac8b30aaa57577770fd636e784361e35d Mon Sep 17 00:00:00 2001 From: ame Date: Thu, 12 Jun 2025 02:10:10 -0500 Subject: fix some net code, add streaming to some requests --- src/lua.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lua.h') 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 #include #include +#include +#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);\ -- cgit v1.2.3