From 69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 28 Feb 2003 16:45:15 -0300 Subject: bug: GC metamethod calls could mess C/Lua stack syncronization --- lgc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 78adf69a..8e3a3257 100644 --- a/lgc.h +++ b/lgc.h @@ -1,5 +1,5 @@ /* -** $Id: lgc.h,v 1.17 2002/11/25 12:38:47 roberto Exp roberto $ +** $Id: lgc.h,v 1.18 2003/02/10 17:32:50 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -11,8 +11,8 @@ #include "lobject.h" -#define luaC_checkGC(L) if (G(L)->nblocks >= G(L)->GCthreshold) \ - luaC_collectgarbage(L) +#define luaC_checkGC(L) { lua_assert(!(L->ci->state & CI_CALLING)); \ + if (G(L)->nblocks >= G(L)->GCthreshold) luaC_collectgarbage(L); } void luaC_separateudata (lua_State *L); -- cgit v1.2.3-55-g6feb