From b2ee662b4621282b137a2a2cf1be13bd60073c5a Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 16 Apr 2025 13:54:00 -0500 Subject: fixes for 5.1 --- src/table.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/table.c') diff --git a/src/table.c b/src/table.c index 6c3686a..593c31b 100644 --- a/src/table.c +++ b/src/table.c @@ -3,6 +3,18 @@ #include #include +int l_unpack(lua_State* L){ + int top = lua_gettop(L); + lua_pushnil(L); + + for(;lua_next(L, top);){ + lua_pushvalue(L, -2); + lua_remove(L, -3); + } + + return lua_gettop(L) - top; +} + uint64_t i_len(lua_State* L, int pos){ uint64_t i = 0; lua_pushnil(L); -- cgit v1.2.3