From 6f176096b8f3a2088c01d67a36e4b67750ec179e Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 27 May 2026 06:00:43 -0500 Subject: .table updates, .dup & .equal --- src/lua.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/lua.h') diff --git a/src/lua.h b/src/lua.h index 1e45242..da65101 100644 --- a/src/lua.h +++ b/src/lua.h @@ -17,14 +17,17 @@ enum deep_copy_flags { STRIP_GC = (1 << 5), IS_UPVALUE = (1 << 6), }; + +enum table_cache { + CACHE_HIT, CACHE_MISS +}; #endif #ifndef GIT_COMMIT #define GIT_COMMIT "unknown" #endif -void* __malloc_(size_t); -void __free_(void*); +enum table_cache table_cache(lua_State* L, char* key, int index); void luaI_deepcopy(lua_State* src, lua_State* dest, enum deep_copy_flags); void luaI_deepcopy2(lua_State* src, lua_State* dest); @@ -108,6 +111,10 @@ extern int _print_errors; int writer(lua_State*, const void*, size_t, void*); +#if LUA_VERSION_NUM != 501 + #define lua_equal(L, A, B) lua_compare(L, A, B, LUA_OPEQ) +#endif + #if LUA_VERSION_NUM == 504 #define lua_objlen lua_rawlen -- cgit v1.2.3