From 98296f6b45208e32a83dcb582b3a37b406289d85 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 24 Aug 2005 13:15:49 -0300 Subject: some bugs related to stack reallocation --- lgc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index becc60fe..6079c03d 100644 --- a/lgc.h +++ b/lgc.h @@ -1,5 +1,5 @@ /* -** $Id: lgc.h,v 2.13 2005/04/25 19:24:10 roberto Exp roberto $ +** $Id: lgc.h,v 2.14 2005/06/07 18:53:45 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -77,7 +77,9 @@ #define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) -#define luaC_checkGC(L) { if (G(L)->totalbytes >= G(L)->GCthreshold) \ +#define luaC_checkGC(L) { \ + condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \ + if (G(L)->totalbytes >= G(L)->GCthreshold) \ luaC_step(L); } -- cgit v1.2.3-55-g6feb