summaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-02-28 16:45:15 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-02-28 16:45:15 -0300
commit69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34 (patch)
treed9505d7a0e89940c55ff0a1fd3c13311b9084197 /lgc.h
parent6b6bc532a4f5e335540e6f19914cfe8435d064ed (diff)
downloadlua-69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34.tar.gz
lua-69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34.tar.bz2
lua-69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34.zip
bug: GC metamethod calls could mess C/Lua stack syncronization
Diffstat (limited to 'lgc.h')
-rw-r--r--lgc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lgc.h b/lgc.h
index 78adf69a..8e3a3257 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 1.17 2002/11/25 12:38:47 roberto Exp roberto $ 2** $Id: lgc.h,v 1.18 2003/02/10 17:32:50 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,8 +11,8 @@
11#include "lobject.h" 11#include "lobject.h"
12 12
13 13
14#define luaC_checkGC(L) if (G(L)->nblocks >= G(L)->GCthreshold) \ 14#define luaC_checkGC(L) { lua_assert(!(L->ci->state & CI_CALLING)); \
15 luaC_collectgarbage(L) 15 if (G(L)->nblocks >= G(L)->GCthreshold) luaC_collectgarbage(L); }
16 16
17 17
18void luaC_separateudata (lua_State *L); 18void luaC_separateudata (lua_State *L);