소스 검색

call limit may be larger than shorts

Roberto Ierusalimschy 20 년 전
부모
커밋
fb0f95a2b7
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 3
      ldo.c
  2. 2 2
      lstate.h

+ 3 - 3
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;

+ 2 - 2
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;