summaryrefslogtreecommitdiffstats
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 @@
+#include "plugin.h"
+#include "lstate.h"
+#include LUA_USER_H
+
+/* lua Out Of Memory */
+static struct lua_OOM l_oom = {NULL, 0};
+
+int set_lua_OOM(lua_State * L)
+{
+ l_oom.L = L;
+ l_oom.count++;
+ return 0;
+}
+
+struct lua_OOM *get_lua_OOM(void)
+{
+ return &l_oom;
+}