aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/signal.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-18 02:22:48 +0200
committerKim Alvefur <zash@zash.se>2014-09-18 02:22:48 +0200
commit31be1596b93612e1c848402bd21207ad06ae30e8 (patch)
tree361f642064745fd1a6601050e7573062ff65e2ad /util-src/signal.c
parent57b543c70405092fc24f859c05c734fc8b361030 (diff)
parentb19f5a09a19534973d522e7400139f040d76391b (diff)
downloadprosody-31be1596b93612e1c848402bd21207ad06ae30e8.tar.gz
prosody-31be1596b93612e1c848402bd21207ad06ae30e8.zip
Merge 0.10->trunk
Diffstat (limited to 'util-src/signal.c')
-rw-r--r--util-src/signal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/util-src/signal.c b/util-src/signal.c
index 961d2d3e..63d65570 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -32,6 +32,10 @@
#include "lua.h"
#include "lauxlib.h"
+#if (LUA_VERSION_NUM == 502)
+#define luaL_register(L, N, R) luaL_setfuncs(L, R, 0)
+#endif
+
#ifndef lsig
#define lsig
@@ -384,13 +388,14 @@ int luaopen_util_signal(lua_State *L)
int i = 0;
/* add the library */
- luaL_register(L, "signal", lsignal_lib);
+ lua_newtable(L);
+ luaL_register(L, NULL, lsignal_lib);
/* push lua_signals table into the registry */
/* put the signals inside the library table too,
* they are only a reference */
lua_pushstring(L, LUA_SIGNAL);
- lua_createtable(L, 0, 0);
+ lua_newtable(L);
while (lua_signals[i].name != NULL)
{