summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lua_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lua_user.c')
-rw-r--r--apps/plugins/lua/lua_user.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/plugins/lua/lua_user.c b/apps/plugins/lua/lua_user.c
new file mode 100644
index 0000000000..8d77dcdf3f
--- /dev/null
+++ b/apps/plugins/lua/lua_user.c
@@ -0,0 +1,18 @@
1#include "plugin.h"
2#include "lstate.h"
3#include LUA_USER_H
4
5/* lua Out Of Memory */
6static struct lua_OOM l_oom = {NULL, 0};
7
8int set_lua_OOM(lua_State * L)
9{
10 l_oom.L = L;
11 l_oom.count++;
12 return 0;
13}
14
15struct lua_OOM *get_lua_OOM(void)
16{
17 return &l_oom;
18}