aboutsummaryrefslogtreecommitdiff
path: root/lfunc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-08-13 15:23:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-08-13 15:23:21 -0300
commitf849885a4b49f2d766e6befc67475c05240023eb (patch)
treeab680958b8cac3cef61c63d5c54c448db7f100ae /lfunc.c
parentf7ce7e5faae69fcab0126d8bfd34b685f1dcb019 (diff)
downloadlua-f849885a4b49f2d766e6befc67475c05240023eb.tar.gz
lua-f849885a4b49f2d766e6befc67475c05240023eb.tar.bz2
lua-f849885a4b49f2d766e6befc67475c05240023eb.zip
Small changes in macros that change GC colors
- Macro 'gray2black' was renamed 'nw2black' (Non-White to black), as it was already being used on objects that could be already black. - Macros 'white2gray' and 'black2gray' were unified in 'set2gray'; no reason to have two macros when one will do and, again, 'black2gray' was already being used on objects that could be already gray. Moreover, macros 'maskcolors' and 'maskgcbits' were negated to have ones in the described bits, instead of zeros. (This naming seems more intuitive.)
Diffstat (limited to 'lfunc.c')
-rw-r--r--lfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfunc.c b/lfunc.c
index f8c3c446..88d45328 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -235,7 +235,7 @@ int luaF_close (lua_State *L, StkId level, int status) {
235 setobj(L, slot, uv->v); /* move value to upvalue slot */ 235 setobj(L, slot, uv->v); /* move value to upvalue slot */
236 uv->v = slot; /* now current value lives here */ 236 uv->v = slot; /* now current value lives here */
237 if (!iswhite(uv)) { /* neither white nor dead? */ 237 if (!iswhite(uv)) { /* neither white nor dead? */
238 gray2black(uv); /* closed upvalues cannot be gray */ 238 nw2black(uv); /* closed upvalues cannot be gray */
239 luaC_barrier(L, uv, slot); 239 luaC_barrier(L, uv, slot);
240 } 240 }
241 } 241 }