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/except.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/except.c')
-rw-r--r-- | src/except.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/except.c b/src/except.c index 1d1ade0..002e701 100644 --- a/src/except.c +++ b/src/except.c | |||
@@ -92,6 +92,10 @@ static int global_protect(lua_State *L) { | |||
92 | * Init module | 92 | * Init module |
93 | \*-------------------------------------------------------------------------*/ | 93 | \*-------------------------------------------------------------------------*/ |
94 | int except_open(lua_State *L) { | 94 | int except_open(lua_State *L) { |
95 | #if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE) | ||
96 | luaL_setfuncs(L, func, 0); | ||
97 | #else | ||
95 | luaL_openlib(L, NULL, func, 0); | 98 | luaL_openlib(L, NULL, func, 0); |
99 | #endif | ||
96 | return 0; | 100 | return 0; |
97 | } | 101 | } |