From 4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2 Mon Sep 17 00:00:00 2001 From: "E. Westbrook" Date: Wed, 27 Feb 2019 20:57:00 -0700 Subject: [PATCH] except: pragma visibility --- src/except.c | 10 ++-------- src/except.h | 6 +++++- 2 files changed, 7 insertions(+), 9 deletions(-) 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