mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-09-17 08:32:02 +02:00
Export global only if LUA_COMPAT_MODULE defined.
This commit is contained in:
@@ -107,7 +107,11 @@ int tcp_open(lua_State *L)
|
||||
auxiliar_add2group(L, "tcp{client}", "tcp{any}");
|
||||
auxiliar_add2group(L, "tcp{server}", "tcp{any}");
|
||||
/* define library functions */
|
||||
#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
|
||||
luaL_setfuncs(L, func, 0);
|
||||
#else
|
||||
luaL_openlib(L, NULL, func, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user