aboutsummaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@impa.br>2013-05-29 16:56:56 +0800
committerDiego Nehab <diego@impa.br>2013-05-29 16:56:56 +0800
commit79e6c4915d267e149e1f3b134901bf355d439c15 (patch)
treefded0a926a268d88710e652fa8cdf06ec77cf217 /src/inet.c
parent5167ddaf499cf198b10208a2f76c27629e99ae1b (diff)
downloadluasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.gz
luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.bz2
luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.zip
Export global only if LUA_COMPAT_MODULE defined.
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inet.c b/src/inet.c
index 1c44464..35bc438 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -40,7 +40,11 @@ int inet_open(lua_State *L)
40{ 40{
41 lua_pushstring(L, "dns"); 41 lua_pushstring(L, "dns");
42 lua_newtable(L); 42 lua_newtable(L);
43#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
44 luaL_setfuncs(L, func, 0);
45#else
43 luaL_openlib(L, NULL, func, 0); 46 luaL_openlib(L, NULL, func, 0);
47#endif
44 lua_settable(L, -3); 48 lua_settable(L, -3);
45 return 0; 49 return 0;
46} 50}