]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: Make dlua_getdovecot() take lua_State * directly
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Thu, 17 Dec 2020 17:55:25 +0000 (12:55 -0500)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 15 Jan 2021 13:32:57 +0000 (13:32 +0000)
src/auth/db-lua.c
src/lib-lua/dlua-dovecot.c
src/lib-lua/dlua-script-private.h
src/lib-storage/mail-storage-lua.c

index cdde89a11260e01a4e06d0675bcdf3eb8995d305..dc2e4e2caf1ee002c0bec106388a66ea68eb810b 100644 (file)
@@ -382,7 +382,7 @@ static luaL_Reg auth_lua_dovecot_auth_methods[] = {
 
 static void auth_lua_dovecot_auth_register(struct dlua_script *script)
 {
-       dlua_getdovecot(script);
+       dlua_getdovecot(script->L);
        /* Create new table for holding values */
        lua_newtable(script->L);
 
index f30bd5a0996106efae9d9d5de323fbb7c4337a29..494fe0a8baa49bb483598839075705ddeb0d943b 100644 (file)
@@ -595,9 +595,9 @@ static luaL_Reg lua_dovecot_methods[] = {
        { NULL, NULL }
 };
 
-void dlua_getdovecot(struct dlua_script *script)
+void dlua_getdovecot(lua_State *L)
 {
-       lua_getglobal(script->L, LUA_SCRIPT_DOVECOT);
+       lua_getglobal(L, LUA_SCRIPT_DOVECOT);
 }
 
 void dlua_dovecot_register(struct dlua_script *script)
index 3ec24369d328161f59a6fb46e520a67b96063505..8b5de2a05978ad1fc9f33871441f4d6fb49ac793 100644 (file)
@@ -93,7 +93,7 @@ struct dlua_script *dlua_script_from_state(lua_State *L);
 void dlua_dovecot_register(struct dlua_script *script);
 
 /* push 'dovecot' global on top of stack */
-void dlua_getdovecot(struct dlua_script *script);
+void dlua_getdovecot(lua_State *L);
 
 /* assign values to table on idx */
 void dlua_setmembers(lua_State *L, const struct dlua_table_values *values, int idx);
index 538030ae098d0054dfc12726e1c4bb6b47532861..978bd8142ccc80e9e86baa57ac54f14e671035c6 100644 (file)
@@ -62,7 +62,7 @@ static luaL_Reg lua_storage_methods[] = {
 void dlua_register_mail_storage(struct dlua_script *script)
 {
        /* get dlua_dovecot */
-       dlua_getdovecot(script);
+       dlua_getdovecot(script->L);
 
        /* Create table for holding values */
        lua_newtable(script->L);