diff options
| -rw-r--r-- | src/except.c | 10 | ||||
| -rw-r--r-- | 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 @@ | |||
| 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 | \*-------------------------------------------------------------------------*/ |
| 129 | LUASOCKET_PRIVATE int except_open(lua_State *L) { | 123 | int 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 | ||
| 36 | int except_open(lua_State *L); | 38 | int except_open(lua_State *L); |
| 37 | 39 | ||
| 40 | #pragma GCC visibility pop | ||
| 41 | |||
| 38 | #endif | 42 | #endif |
