From 658dfe580234b987bbf4579ada80239d84c430c2 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sat, 20 Jun 2026 13:49:26 +0200 Subject: [PATCH] yep --- src/lua_rds.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lua_rds.c b/src/lua_rds.c index 7e7613e..05db25c 100644 --- a/src/lua_rds.c +++ b/src/lua_rds.c @@ -7,6 +7,7 @@ lua_State *globalL = NULL; int hooks_ref = LUA_NOREF; static pthread_mutex_t lua_mutex; +#define lua_registertotable(L,n,f) (lua_pushcfunction(L, (f)), lua_setfield(L, -2, (n))) int init_lua_userdata(lua_State* L) { lua_newtable(L); lua_registertotable(L, "get", lua_get_userdata); @@ -85,7 +86,6 @@ static int my_searcher(lua_State *L) { return 1; } -#define lua_registertotable(L,n,f) (lua_pushcfunction(L, (f)), lua_setfield(L, -2, (n))) uint8_t init_lua(RDSEncoder* _enc) { static int mutex_initialized = 0; enc = _enc; @@ -105,11 +105,11 @@ uint8_t init_lua(RDSEncoder* _enc) { lua_pop(globalL, 8); luaL_requiref(globalL, LUA_LOADLIBNAME, luaopen_package, 1); - lua_newtable(L); - lua_pushcfunction(L, my_searcher); - lua_rawseti(L, -2, 1); - lua_setfield(L, -2, "searchers"); - lua_pop(L, 1); + lua_newtable(globaL); + lua_pushcfunction(globaL, my_searcher); + lua_rawseti(globaL, -2, 1); + lua_setfield(globaL, -2, "searchers"); + lua_pop(globaL, 1); luaL_requiref(globalL, "hooks", init_lua_hooks, 1); hooks_ref = luaL_ref(globalL, LUA_REGISTRYINDEX);