mirror of https://github.com/rusefi/lua.git
code detail ('if' -> '?:')
This commit is contained in:
parent
7d930ec694
commit
331632e8d8
12
ltests.c
12
ltests.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 2.202 2015/01/16 16:54:37 roberto Exp roberto $
|
** $Id: ltests.c,v 2.203 2015/03/11 16:10:41 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -289,11 +289,11 @@ static void checkLclosure (global_State *g, LClosure *cl) {
|
||||||
static int lua_checkpc (lua_State *L, CallInfo *ci) {
|
static int lua_checkpc (lua_State *L, CallInfo *ci) {
|
||||||
if (!isLua(ci)) return 1;
|
if (!isLua(ci)) return 1;
|
||||||
else {
|
else {
|
||||||
Proto *p;
|
/* if function yielded (inside a hook), real 'func' is in 'extra' field */
|
||||||
if (L->status != LUA_YIELD || ci != L->ci)
|
StkId f = (L->status != LUA_YIELD || ci != L->ci)
|
||||||
p = clLvalue(ci->func)->p;
|
? ci->func
|
||||||
else /* real 'func' was saved in 'extra' field */
|
: restorestack(L, ci->extra);
|
||||||
p = clLvalue(restorestack(L, ci->extra))->p;
|
Proto *p = clLvalue(f)->p;
|
||||||
return p->code <= ci->u.l.savedpc &&
|
return p->code <= ci->u.l.savedpc &&
|
||||||
ci->u.l.savedpc <= p->code + p->sizecode;
|
ci->u.l.savedpc <= p->code + p->sizecode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue