From 586636064bac10e8848372dd17937ed4a4d1c6f6 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Sat, 11 Jan 2025 15:35:15 -0600 Subject: chunked encoding --- src/lua.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lua.h') diff --git a/src/lua.h b/src/lua.h index c40d3f2..ccc632d 100644 --- a/src/lua.h +++ b/src/lua.h @@ -50,6 +50,17 @@ void lua_set_global_table(lua_State*); #define luaI_tsetlud(L, Tidx, K, V)\ _tset_b(L, Tidx, K, V, lua_pushlightuserdata) +#define luaI_treplk(L, Tidx, K, nK){\ + lua_pushstring(L, K);\ + lua_gettable(L, Tidx);\ + int _v = lua_gettop(L);\ + luaI_tsetv(L, Tidx, nK, _v);\ + lua_pushstring(L, K);\ + lua_pushnil(L);\ + lua_settable(L, Tidx);\ + lua_pop(L, 1);} + + int writer(lua_State*, const void*, size_t, void*); #if LUA_VERSION_NUM == 504 -- cgit v1.2.3