summaryrefslogtreecommitdiff
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-github-f849885a4b49f2d766e6befc67475c05240023eb.tar.gz
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) {
setobj(L, slot, uv->v); /* move value to upvalue slot */
uv->v = slot; /* now current value lives here */
if (!iswhite(uv)) { /* neither white nor dead? */
- gray2black(uv); /* closed upvalues cannot be gray */
+ nw2black(uv); /* closed upvalues cannot be gray */
luaC_barrier(L, uv, slot);
}
}