aboutsummaryrefslogtreecommitdiff
path: root/src/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/except.c')
-rw-r--r--src/except.c9
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\*=========================================================================*/
15static int global_protect(lua_State *L); 16static int global_protect(lua_State *L);
16static int global_newtry(lua_State *L); 17static int global_newtry(lua_State *L);
17static int protected(lua_State *L); 18static int protected_(lua_State *L);
18static int finalize(lua_State *L); 19static int finalize(lua_State *L);
19static int do_nothing(lua_State *L); 20static 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\*-------------------------------------------------------------------------*/
56static int protected(lua_State *L) { 57static 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
66static int global_protect(lua_State *L) { 67static 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