except: pragma visibility

This commit is contained in:
E. Westbrook 2019-02-27 20:57:00 -07:00
parent 133774cd3d
commit 4bf3eb6db2
2 changed files with 7 additions and 9 deletions

View File

@ -3,14 +3,8 @@
* LuaSocket toolkit * LuaSocket toolkit
\*=========================================================================*/ \*=========================================================================*/
#include "luasocket.h" #include "luasocket.h"
#include <stdio.h>
#include "lua.h"
#include "lauxlib.h"
#include "compat.h"
#include "except.h" #include "except.h"
#include <stdio.h>
#if LUA_VERSION_NUM < 502 #if LUA_VERSION_NUM < 502
#define lua_pcallk(L, na, nr, err, ctx, cont) \ #define lua_pcallk(L, na, nr, err, ctx, cont) \
@ -126,7 +120,7 @@ static int global_protect(lua_State *L) {
/*-------------------------------------------------------------------------*\ /*-------------------------------------------------------------------------*\
* Init module * Init module
\*-------------------------------------------------------------------------*/ \*-------------------------------------------------------------------------*/
LUASOCKET_PRIVATE int except_open(lua_State *L) { int except_open(lua_State *L) {
lua_newtable(L); /* metatable for wrapped exceptions */ lua_newtable(L); /* metatable for wrapped exceptions */
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
lua_setfield(L, -2, "__metatable"); lua_setfield(L, -2, "__metatable");

View File

@ -31,8 +31,12 @@
* exceptions on error, but that don't interrupt the user script. * 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); int except_open(lua_State *L);
#pragma GCC visibility pop
#endif #endif