diff options
Diffstat (limited to 'src/except.c')
-rw-r--r-- | src/except.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/except.c b/src/except.c index ad03817..80d7e5d 100644 --- a/src/except.c +++ b/src/except.c | |||
@@ -4,8 +4,9 @@ | |||
4 | * | 4 | * |
5 | * RCS ID: $Id$ | 5 | * RCS ID: $Id$ |
6 | \*=========================================================================*/ | 6 | \*=========================================================================*/ |
7 | #include <lauxlib.h> | ||
8 | #include <stdio.h> | 7 | #include <stdio.h> |
8 | #include <lua.h> | ||
9 | #include <lauxlib.h> | ||
9 | 10 | ||
10 | #include "except.h" | 11 | #include "except.h" |
11 | 12 | ||
@@ -14,7 +15,7 @@ | |||
14 | \*=========================================================================*/ | 15 | \*=========================================================================*/ |
15 | static int global_protect(lua_State *L); | 16 | static int global_protect(lua_State *L); |
16 | static int global_newtry(lua_State *L); | 17 | static int global_newtry(lua_State *L); |
17 | static int protected(lua_State *L); | 18 | static int protected_(lua_State *L); |
18 | static int finalize(lua_State *L); | 19 | static int finalize(lua_State *L); |
19 | static int do_nothing(lua_State *L); | 20 | static int do_nothing(lua_State *L); |
20 | 21 | ||
@@ -53,7 +54,7 @@ static int global_newtry(lua_State *L) { | |||
53 | /*-------------------------------------------------------------------------*\ | 54 | /*-------------------------------------------------------------------------*\ |
54 | * Protect factory | 55 | * Protect factory |
55 | \*-------------------------------------------------------------------------*/ | 56 | \*-------------------------------------------------------------------------*/ |
56 | static int protected(lua_State *L) { | 57 | static int protected_(lua_State *L) { |
57 | lua_pushvalue(L, lua_upvalueindex(1)); | 58 | lua_pushvalue(L, lua_upvalueindex(1)); |
58 | lua_insert(L, 1); | 59 | lua_insert(L, 1); |
59 | if (lua_pcall(L, lua_gettop(L) - 1, LUA_MULTRET, 0) != 0) { | 60 | if (lua_pcall(L, lua_gettop(L) - 1, LUA_MULTRET, 0) != 0) { |
@@ -64,7 +65,7 @@ static int protected(lua_State *L) { | |||
64 | } | 65 | } |
65 | 66 | ||
66 | static int global_protect(lua_State *L) { | 67 | static int global_protect(lua_State *L) { |
67 | lua_pushcclosure(L, protected, 1); | 68 | lua_pushcclosure(L, protected_, 1); |
68 | return 1; | 69 | return 1; |
69 | } | 70 | } |
70 | 71 | ||