mirror of https://github.com/rusefi/lua.git
call limit may be larger than shorts
This commit is contained in:
parent
d3a6d95b9a
commit
fb0f95a2b7
6
ldo.c
6
ldo.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ldo.c,v 2.17 2005/03/09 16:28:07 roberto Exp roberto $
|
** $Id: ldo.c,v 2.18 2005/03/16 20:02:48 roberto Exp roberto $
|
||||||
** Stack and Call structure of Lua
|
** Stack and Call structure of Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -135,7 +135,7 @@ void luaD_reallocstack (lua_State *L, int newsize) {
|
||||||
void luaD_reallocCI (lua_State *L, int newsize) {
|
void luaD_reallocCI (lua_State *L, int newsize) {
|
||||||
CallInfo *oldci = L->base_ci;
|
CallInfo *oldci = L->base_ci;
|
||||||
luaM_reallocvector(L, L->base_ci, L->size_ci, newsize, CallInfo);
|
luaM_reallocvector(L, L->base_ci, L->size_ci, newsize, CallInfo);
|
||||||
L->size_ci = cast(unsigned short, newsize);
|
L->size_ci = newsize;
|
||||||
L->ci = (L->ci - oldci) + L->base_ci;
|
L->ci = (L->ci - oldci) + L->base_ci;
|
||||||
L->end_ci = L->base_ci + L->size_ci - 1;
|
L->end_ci = L->base_ci + L->size_ci - 1;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ LUA_API int lua_yield (lua_State *L, int nresults) {
|
||||||
int luaD_pcall (lua_State *L, Pfunc func, void *u,
|
int luaD_pcall (lua_State *L, Pfunc func, void *u,
|
||||||
ptrdiff_t old_top, ptrdiff_t ef) {
|
ptrdiff_t old_top, ptrdiff_t ef) {
|
||||||
int status;
|
int status;
|
||||||
unsigned short oldnCcalls = L->nCcalls;
|
int oldnCcalls = L->nCcalls;
|
||||||
ptrdiff_t old_ci = saveci(L, L->ci);
|
ptrdiff_t old_ci = saveci(L, L->ci);
|
||||||
lu_byte old_allowhooks = L->allowhook;
|
lu_byte old_allowhooks = L->allowhook;
|
||||||
ptrdiff_t old_errfunc = L->errfunc;
|
ptrdiff_t old_errfunc = L->errfunc;
|
||||||
|
|
4
lstate.h
4
lstate.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstate.h,v 2.15 2005/02/18 12:40:02 roberto Exp roberto $
|
** $Id: lstate.h,v 2.16 2005/02/23 17:30:22 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,7 @@ struct lua_State {
|
||||||
int stacksize;
|
int stacksize;
|
||||||
CallInfo *end_ci; /* points after end of ci array*/
|
CallInfo *end_ci; /* points after end of ci array*/
|
||||||
CallInfo *base_ci; /* array of CallInfo's */
|
CallInfo *base_ci; /* array of CallInfo's */
|
||||||
unsigned short size_ci; /* size of array `base_ci' */
|
int size_ci; /* size of array `base_ci' */
|
||||||
unsigned short nCcalls; /* number of nested C calls */
|
unsigned short nCcalls; /* number of nested C calls */
|
||||||
lu_byte hookmask;
|
lu_byte hookmask;
|
||||||
lu_byte allowhook;
|
lu_byte allowhook;
|
||||||
|
|
Loading…
Reference in New Issue