Browse Source

default PAUSE should be 200 (differences may be corrected in
internal multiplers)
+ check for unbilt stack equal the one used by lgc.c

Roberto Ierusalimschy 15 years ago
parent
commit
0062db1e06
1 changed files with 6 additions and 6 deletions
  1. 6 6
      lstate.c

+ 6 - 6
lstate.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lstate.c,v 2.82 2010/04/19 17:40:13 roberto Exp roberto $
+** $Id: lstate.c,v 2.83 2010/04/29 17:35:10 roberto Exp roberto $
 ** Global State
 ** See Copyright Notice in lua.h
 */
@@ -26,7 +26,7 @@
 
 
 #if !defined(LUAI_GCPAUSE)
-#define LUAI_GCPAUSE	162  /* 162% */
+#define LUAI_GCPAUSE	200  /* 200% */
 #endif
 
 #if !defined(LUAI_GCMUL)
@@ -110,10 +110,10 @@ static void stack_init (lua_State *L1, lua_State *L) {
 
 
 static void freestack (lua_State *L) {
-  if (L->ci != NULL) {  /* is there a 'ci' list? */
-    L->ci = &L->base_ci;  /* free the entire list */
-    luaE_freeCI(L);
-  }
+  if (L->stack == NULL)
+    return;  /* stack not completely built yet */
+  L->ci = &L->base_ci;  /* free the entire 'ci' list */
+  luaE_freeCI(L);
   luaM_freearray(L, L->stack, L->stacksize);  /* free stack array */
 }