aboutsummaryrefslogtreecommitdiff
path: root/src/lib-lua/dlua-script.c
AgeCommit message (Collapse)AuthorLines
2021-09-17lib-lua: Use rawget to check presence of functions in scriptsSiavash Tavakoli-2/+4
With the restricted global variables in next commit, checking for undeclared functions results in error. Use rawget to avoid metamethods.
2021-08-17global: Use consistent lua function namesSiavash Tavakoli-1/+1
Change lua-style function names to be consistent with dovecot's style.
2021-06-01lib-lua: Delay running Lua script until dlua_script_init()Timo Sirainen-12/+16
This allows the caller to register globals before running the script.
2021-06-01lib-lua: Move finalizing event and setting linked list to dlua_create_script()Timo Sirainen-3/+2
There's no need to delay them until dlua_script_create_finish().
2021-06-01lib-lua: dlua_script_init() - Always return -1 if script_init() failsTimo Sirainen-1/+3
The previous behavior was to forward the script_init() return value to the caller. This was somewhat unexpected behavior.
2021-05-12lib-lua: Define lua_isinteger as boolean functionAki Tuomi-1/+1
2021-05-12lib-lua: Fix error reporting for script loadingAki Tuomi-46/+8
2021-05-12lib-lua: Fix luaL_error usageAki Tuomi-3/+3
2021-05-06lib-lua: Remove obsolete threading checkJosef 'Jeff' Sipek-9/+0
We support multiple lua thread as long as they are created using the dlua_script_new_thread() helper.
2021-03-22lib-lua: Fix script loadingAki Tuomi-14/+34
Handle error cases correctly.
2021-03-22lib-lua: Use dlua_pcallAki Tuomi-44/+28
2021-03-22lib-lua: Add dlua_pcallAki Tuomi-0/+76
2021-03-19lib-lua: Add new thread/close thread dlua wrappersAki Tuomi-0/+7
Code rewritten to use lua registry, warn about unclosed threads, and moved to a separate file by Josef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
2021-01-15lib-lua: Add dlua_register()Josef 'Jeff' Sipek-0/+7
2021-01-15lib-lua: Make dlua_dump_stack() take lua_State * directlyJosef 'Jeff' Sipek-7/+7
2021-01-15lib-lua: Make dlua_setmembers() take lua_State * directlyJosef 'Jeff' Sipek-10/+10
2021-01-11lib-lua: Log an error when lua deinit function failedJosef 'Jeff' Sipek-2/+2
2021-01-11lib-lua: Move init/deinit function invocation into helper functionsJosef 'Jeff' Sipek-23/+36
This moves them out of the way and keeps them close to each other.
2021-01-11lib-lua: Warn if threading was detectedJosef 'Jeff' Sipek-0/+10
2021-01-11lib-lua: Store script pointer in LUA_REGISTRYAki Tuomi-4/+17
This will allow us to translate any lua thread to a script pointer. This is not meant to allow multi-threaded lua scripts, but it is necessary to allow yields to work.
2020-12-15lib-lua: Stop sharing lua states based on the script file nameJosef 'Jeff' Sipek-28/+0
Instead of all instances of the same lua script sharing the same stack and globals, make them completely separate instances. Removing this optimization will make support of yielding possible.
2020-07-01lib-lua: Register panic handlerAki Tuomi-0/+8
2020-07-01lib-lua: Add dlua_dump_stackAki Tuomi-0/+27
Useful for debugging why stack leaks
2018-10-18lib-lua: Add events to scriptsAki Tuomi-7/+16
2018-05-31lib-lua: Add lua_pushboolean helper to push real booleansAki Tuomi-1/+1
Makes boolean handling in dovecot code slightly easier
2018-03-12lib-lua: Remove script from linked list on destroyAki Tuomi-0/+3
Otherwise it might cause a crash
2018-01-01Updated copyright notices to include the year 2018.Stephan Bosch-1/+1
2017-11-24lib-lua: Add lua helper libraryAki Tuomi-0/+344
Provides a base lua library for lua extensibility