[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: I am a Lua Newbie... pls help me
- From: "luanewbie" <luanewbie@...>
- Date: Thu, 13 Mar 2003 03:55:58 -0000
hi all,
I want to post some more details for the previous message ^^
I just keep tracing my code... and I found out the following error
when I jump into this lua function
int luaD_runprotected (lua_State *L, void (*f)(lua_State *, void *),
void *ud) {
StkId oldCbase = L->Cbase;
StkId oldtop = L->top;
struct lua_longjmp lj;
int allowhooks = L->allowhooks;
lj.status = 0;
lj.previous = L->errorJmp; /* chain new error handler */
L->errorJmp = &lj;
if (setjmp(lj.b) == 0) <========= I got error in here
(*f)(L, ud);
else { /* an error occurred: restore the state */
L->allowhooks = allowhooks;
L->Cbase = oldCbase;
L->top = oldtop;
restore_stack_limit(L);
}
L->errorJmp = lj.previous; /* restore old error handler */
return lj.status;
}
Since when my running to
if (setjmp(lj.b) == 0)
the value is equal to 3 but not 0... if there anything that I missed??
thxthx
Newbie