aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorE. Westbrook <github@westbrook.io>2019-02-27 20:57:00 -0700
committerE. Westbrook <github@westbrook.io>2019-03-10 00:03:04 -0700
commit4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2 (patch)
treea97fa0c59c32571bd3d0eafc9f95343823e490e1 /src
parent133774cd3db0d8ce8ccc1df8538a6d44552fc1f0 (diff)
downloadluasocket-4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2.tar.gz
luasocket-4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2.tar.bz2
luasocket-4bf3eb6db2315fef8f3d18c8ce742752f7e4fda2.zip
except: pragma visibility
Diffstat (limited to 'src')
-rw-r--r--src/except.c10
-rw-r--r--src/except.h6
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 @@
3* LuaSocket toolkit 3* LuaSocket toolkit
4\*=========================================================================*/ 4\*=========================================================================*/
5#include "luasocket.h" 5#include "luasocket.h"
6
7#include <stdio.h>
8
9#include "lua.h"
10#include "lauxlib.h"
11#include "compat.h"
12
13#include "except.h" 6#include "except.h"
7#include <stdio.h>
14 8
15#if LUA_VERSION_NUM < 502 9#if LUA_VERSION_NUM < 502
16#define lua_pcallk(L, na, nr, err, ctx, cont) \ 10#define lua_pcallk(L, na, nr, err, ctx, cont) \
@@ -126,7 +120,7 @@ static int global_protect(lua_State *L) {
126/*-------------------------------------------------------------------------*\ 120/*-------------------------------------------------------------------------*\
127* Init module 121* Init module
128\*-------------------------------------------------------------------------*/ 122\*-------------------------------------------------------------------------*/
129LUASOCKET_PRIVATE int except_open(lua_State *L) { 123int except_open(lua_State *L) {
130 lua_newtable(L); /* metatable for wrapped exceptions */ 124 lua_newtable(L); /* metatable for wrapped exceptions */
131 lua_pushboolean(L, 0); 125 lua_pushboolean(L, 0);
132 lua_setfield(L, -2, "__metatable"); 126 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 @@
31* exceptions on error, but that don't interrupt the user script. 31* exceptions on error, but that don't interrupt the user script.
32\*=========================================================================*/ 32\*=========================================================================*/
33 33
34#include "lua.h" 34#include "luasocket.h"
35
36#pragma GCC visibility push(hidden)
35 37
36int except_open(lua_State *L); 38int except_open(lua_State *L);
37 39
40#pragma GCC visibility pop
41
38#endif 42#endif