commit fb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d
parent d3a6d95b9af04359c77aed1eed39615b56141356
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 18 Mar 2005 15:54:47 -0300
call limit may be larger than shorts
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ldo.c b/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
** 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) {
CallInfo *oldci = L->base_ci;
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->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,
ptrdiff_t old_top, ptrdiff_t ef) {
int status;
- unsigned short oldnCcalls = L->nCcalls;
+ int oldnCcalls = L->nCcalls;
ptrdiff_t old_ci = saveci(L, L->ci);
lu_byte old_allowhooks = L->allowhook;
ptrdiff_t old_errfunc = L->errfunc;
diff --git a/lstate.h b/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
** See Copyright Notice in lua.h
*/
@@ -107,7 +107,7 @@ struct lua_State {
int stacksize;
CallInfo *end_ci; /* points after end of ci array*/
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 */
lu_byte hookmask;
lu_byte allowhook;