diff --git a/src/except.c b/src/except.c index dab70e7..9c3317f 100644 --- a/src/except.c +++ b/src/except.c @@ -3,14 +3,8 @@ * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" - -#include - -#include "lua.h" -#include "lauxlib.h" -#include "compat.h" - #include "except.h" +#include #if LUA_VERSION_NUM < 502 #define lua_pcallk(L, na, nr, err, ctx, cont) \ @@ -126,7 +120,7 @@ static int global_protect(lua_State *L) { /*-------------------------------------------------------------------------*\ * Init module \*-------------------------------------------------------------------------*/ -LUASOCKET_PRIVATE int except_open(lua_State *L) { +int except_open(lua_State *L) { lua_newtable(L); /* metatable for wrapped exceptions */ lua_pushboolean(L, 0); lua_setfield(L, -2, "__metatable"); diff --git a/src/except.h b/src/except.h index 2497c05..baa7b09 100644 --- a/src/except.h +++ b/src/except.h @@ -31,8 +31,12 @@ * exceptions on error, but that don't interrupt the user script. \*=========================================================================*/ -#include "lua.h" +#include "luasocket.h" + +#pragma GCC visibility push(hidden) int except_open(lua_State *L); +#pragma GCC visibility pop + #endif