diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-28 16:45:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-02-28 16:45:15 -0300 |
commit | 69dd9461e5aeb98fe9bbc71f1e81859d03ec8a34 (patch) | |
tree | d9505d7a0e89940c55ff0a1fd3c13311b9084197 /lgc.h | |
parent | 6b6bc532a4f5e335540e6f19914cfe8435d064ed (diff) | |
download | lua-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.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 | ||
18 | void luaC_separateudata (lua_State *L); | 18 | void luaC_separateudata (lua_State *L); |