Software /
code /
prosody
Diff
util-src/net.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/net.c Tue Sep 16 13:02:21 2014 -0400 +++ b/util-src/net.c Thu Sep 18 02:22:48 2014 +0200 @@ -26,6 +26,10 @@ #include <lua.h> #include <lauxlib.h> +#if (LUA_VERSION_NUM == 502) +#define luaL_register(L, N, R) luaL_setfuncs(L, R, 0) +#endif + /* Enumerate all locally configured IP addresses */ const char * const type_strings[] = { @@ -112,6 +116,7 @@ { NULL, NULL } }; - luaL_register(L, "net", exports); + lua_newtable(L); + luaL_register(L, NULL, exports); return 1; }