diff options
-rw-r--r-- | ldo.c | 6 | ||||
-rw-r--r-- | luaconf.h | 10 |
2 files changed, 8 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.10 2004/09/15 20:39:42 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.11 2004/09/22 12:37:52 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -70,7 +70,7 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { | |||
70 | void luaD_throw (lua_State *L, int errcode) { | 70 | void luaD_throw (lua_State *L, int errcode) { |
71 | if (L->errorJmp) { | 71 | if (L->errorJmp) { |
72 | L->errorJmp->status = errcode; | 72 | L->errorJmp->status = errcode; |
73 | L_THROW(L->errorJmp); | 73 | L_THROW(L, L->errorJmp); |
74 | } | 74 | } |
75 | else { | 75 | else { |
76 | if (G(L)->panic) G(L)->panic(L); | 76 | if (G(L)->panic) G(L)->panic(L); |
@@ -84,7 +84,7 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { | |||
84 | lj.status = 0; | 84 | lj.status = 0; |
85 | lj.previous = L->errorJmp; /* chain new error handler */ | 85 | lj.previous = L->errorJmp; /* chain new error handler */ |
86 | L->errorJmp = &lj; | 86 | L->errorJmp = &lj; |
87 | L_TRY(&lj, | 87 | L_TRY(L, &lj, |
88 | (*f)(L, ud); | 88 | (*f)(L, ud); |
89 | ); | 89 | ); |
90 | L->errorJmp = lj.previous; /* restore old error handler */ | 90 | L->errorJmp = lj.previous; /* restore old error handler */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.17 2004/11/24 18:55:56 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.18 2004/12/01 15:50:18 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -234,14 +234,14 @@ | |||
234 | #ifndef __cplusplus | 234 | #ifndef __cplusplus |
235 | /* default handling with long jumps */ | 235 | /* default handling with long jumps */ |
236 | #include <setjmp.h> | 236 | #include <setjmp.h> |
237 | #define L_THROW(c) longjmp((c)->b, 1) | 237 | #define L_THROW(L,c) longjmp((c)->b, 1) |
238 | #define L_TRY(c,a) if (setjmp((c)->b) == 0) { a } | 238 | #define L_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } |
239 | #define l_jmpbuf jmp_buf | 239 | #define l_jmpbuf jmp_buf |
240 | 240 | ||
241 | #else | 241 | #else |
242 | /* C++ exceptions */ | 242 | /* C++ exceptions */ |
243 | #define L_THROW(c) throw(c) | 243 | #define L_THROW(L,c) throw(c) |
244 | #define L_TRY(c,a) try { a } catch(...) \ | 244 | #define L_TRY(L,c,a) try { a } catch(...) \ |
245 | { if ((c)->status == 0) (c)->status = -1; } | 245 | { if ((c)->status == 0) (c)->status = -1; } |
246 | #define l_jmpbuf int /* dummy variable */ | 246 | #define l_jmpbuf int /* dummy variable */ |
247 | #endif | 247 | #endif |