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/timeout.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/timeout.c')
-rw-r--r-- | src/timeout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timeout.c b/src/timeout.c index c7354b5..bdd5e1c 100644 --- a/src/timeout.c +++ b/src/timeout.c | |||
@@ -144,7 +144,11 @@ double timeout_gettime(void) { | |||
144 | * Initializes module | 144 | * Initializes module |
145 | \*-------------------------------------------------------------------------*/ | 145 | \*-------------------------------------------------------------------------*/ |
146 | int timeout_open(lua_State *L) { | 146 | int timeout_open(lua_State *L) { |
147 | #if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE) | ||
148 | luaL_setfuncs(L, func, 0); | ||
149 | #else | ||
147 | luaL_openlib(L, NULL, func, 0); | 150 | luaL_openlib(L, NULL, func, 0); |
151 | #endif | ||
148 | return 0; | 152 | return 0; |
149 | } | 153 | } |
150 | 154 | ||