diff options
author | Diego Nehab <diego@impa.br> | 2013-05-29 16:56:56 +0800 |
---|---|---|
committer | Diego Nehab <diego@impa.br> | 2013-05-29 16:56:56 +0800 |
commit | 79e6c4915d267e149e1f3b134901bf355d439c15 (patch) | |
tree | fded0a926a268d88710e652fa8cdf06ec77cf217 /src/udp.c | |
parent | 5167ddaf499cf198b10208a2f76c27629e99ae1b (diff) | |
download | luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.gz luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.bz2 luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.zip |
Export global only if LUA_COMPAT_MODULE defined.
Diffstat (limited to 'src/udp.c')
-rw-r--r-- | src/udp.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -109,7 +109,11 @@ int udp_open(lua_State *L) | |||
109 | auxiliar_add2group(L, "udp{connected}", "select{able}"); | 109 | auxiliar_add2group(L, "udp{connected}", "select{able}"); |
110 | auxiliar_add2group(L, "udp{unconnected}", "select{able}"); | 110 | auxiliar_add2group(L, "udp{unconnected}", "select{able}"); |
111 | /* define library functions */ | 111 | /* define library functions */ |
112 | #if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE) | ||
113 | luaL_setfuncs(L, func, 0); | ||
114 | #else | ||
112 | luaL_openlib(L, NULL, func, 0); | 115 | luaL_openlib(L, NULL, func, 0); |
116 | #endif | ||
113 | return 0; | 117 | return 0; |
114 | } | 118 | } |
115 | 119 | ||