mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 22:24:28 +02:00
Export global only if LUA_COMPAT_MODULE defined.
This commit is contained in:
@ -40,7 +40,11 @@ int inet_open(lua_State *L)
|
||||
{
|
||||
lua_pushstring(L, "dns");
|
||||
lua_newtable(L);
|
||||
#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
|
||||
luaL_setfuncs(L, func, 0);
|
||||
#else
|
||||
luaL_openlib(L, NULL, func, 0);
|
||||
#endif
|
||||
lua_settable(L, -3);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user