Export global only if LUA_COMPAT_MODULE defined.
This commit is contained in:
parent
5167ddaf49
commit
79e6c4915d
11 changed files with 55 additions and 37 deletions
|
@ -109,7 +109,11 @@ int udp_open(lua_State *L)
|
|||
auxiliar_add2group(L, "udp{connected}", "select{able}");
|
||||
auxiliar_add2group(L, "udp{unconnected}", "select{able}");
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue