aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-18 15:55:09 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-03-18 15:55:09 -0300
commitfb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d (patch)
treecbad662b0a546d6a69a4d8e206f788e83bd2212c
parentd3a6d95b9af04359c77aed1eed39615b56141356 (diff)
downloadlua-fb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d.tar.gz
lua-fb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d.tar.bz2
lua-fb0f95a2b77f5be3b7be72c33dda9ad6d8894d4d.zip
call limit may be larger than shorts
-rw-r--r--ldo.c6
-rw-r--r--lstate.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/ldo.c b/ldo.c
index 9b604a65..8e241e8d 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.17 2005/03/09 16:28:07 roberto Exp roberto $ 2** $Id: ldo.c,v 2.18 2005/03/16 20:02:48 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*/
@@ -135,7 +135,7 @@ void luaD_reallocstack (lua_State *L, int newsize) {
135void luaD_reallocCI (lua_State *L, int newsize) { 135void luaD_reallocCI (lua_State *L, int newsize) {
136 CallInfo *oldci = L->base_ci; 136 CallInfo *oldci = L->base_ci;
137 luaM_reallocvector(L, L->base_ci, L->size_ci, newsize, CallInfo); 137 luaM_reallocvector(L, L->base_ci, L->size_ci, newsize, CallInfo);
138 L->size_ci = cast(unsigned short, newsize); 138 L->size_ci = newsize;
139 L->ci = (L->ci - oldci) + L->base_ci; 139 L->ci = (L->ci - oldci) + L->base_ci;
140 L->end_ci = L->base_ci + L->size_ci - 1; 140 L->end_ci = L->base_ci + L->size_ci - 1;
141} 141}
@@ -436,7 +436,7 @@ LUA_API int lua_yield (lua_State *L, int nresults) {
436int luaD_pcall (lua_State *L, Pfunc func, void *u, 436int luaD_pcall (lua_State *L, Pfunc func, void *u,
437 ptrdiff_t old_top, ptrdiff_t ef) { 437 ptrdiff_t old_top, ptrdiff_t ef) {
438 int status; 438 int status;
439 unsigned short oldnCcalls = L->nCcalls; 439 int oldnCcalls = L->nCcalls;
440 ptrdiff_t old_ci = saveci(L, L->ci); 440 ptrdiff_t old_ci = saveci(L, L->ci);
441 lu_byte old_allowhooks = L->allowhook; 441 lu_byte old_allowhooks = L->allowhook;
442 ptrdiff_t old_errfunc = L->errfunc; 442 ptrdiff_t old_errfunc = L->errfunc;
diff --git a/lstate.h b/lstate.h
index 481cd4fc..55167e57 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.15 2005/02/18 12:40:02 roberto Exp roberto $ 2** $Id: lstate.h,v 2.16 2005/02/23 17:30:22 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -107,7 +107,7 @@ struct lua_State {
107 int stacksize; 107 int stacksize;
108 CallInfo *end_ci; /* points after end of ci array*/ 108 CallInfo *end_ci; /* points after end of ci array*/
109 CallInfo *base_ci; /* array of CallInfo's */ 109 CallInfo *base_ci; /* array of CallInfo's */
110 unsigned short size_ci; /* size of array `base_ci' */ 110 int size_ci; /* size of array `base_ci' */
111 unsigned short nCcalls; /* number of nested C calls */ 111 unsigned short nCcalls; /* number of nested C calls */
112 lu_byte hookmask; 112 lu_byte hookmask;
113 lu_byte allowhook; 113 lu_byte allowhook;