Software /
code /
prosody
Diff
util-src/signal.c @ 6418:ae798314347c
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Sep 2014 02:22:48 +0200 |
parent | 6413:a552f4170aed |
child | 6615:8e4572a642cb |
line wrap: on
line diff
--- a/util-src/signal.c Tue Sep 16 13:02:21 2014 -0400 +++ b/util-src/signal.c Thu Sep 18 02:22:48 2014 +0200 @@ -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 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) {