aboutsummaryrefslogtreecommitdiff
path: root/src/tcp.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/tcp.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/tcp.c')
-rw-r--r--src/tcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tcp.c b/src/tcp.c
index 60c1e8a..efb92c9 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -107,7 +107,11 @@ int tcp_open(lua_State *L)
107 auxiliar_add2group(L, "tcp{client}", "tcp{any}"); 107 auxiliar_add2group(L, "tcp{client}", "tcp{any}");
108 auxiliar_add2group(L, "tcp{server}", "tcp{any}"); 108 auxiliar_add2group(L, "tcp{server}", "tcp{any}");
109 /* define library functions */ 109 /* define library functions */
110#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
111 luaL_setfuncs(L, func, 0);
112#else
110 luaL_openlib(L, NULL, func, 0); 113 luaL_openlib(L, NULL, func, 0);
114#endif
111 return 0; 115 return 0;
112} 116}
113 117