Several small changes from feedback on 5.4 alhpa rc1 (warnings,
typos in the manual, and the like)
This commit is contained in:
Roberto Ierusalimschy
2019-06-03 11:36:42 -03:00
parent 7d0f41df41
commit 2c68e66570
8 changed files with 23 additions and 23 deletions

4
lgc.c
View File

@@ -484,8 +484,8 @@ static lu_mem traversetable (global_State *g, Table *h) {
const TValue *mode = gfasttm(g, h->metatable, TM_MODE);
markobjectN(g, h->metatable);
if (mode && ttisstring(mode) && /* is there a weak mode? */
((weakkey = strchr(svalue(mode), 'k')),
(weakvalue = strchr(svalue(mode), 'v')),
(cast_void(weakkey = strchr(svalue(mode), 'k')),
cast_void(weakvalue = strchr(svalue(mode), 'v')),
(weakkey || weakvalue))) { /* is really weak? */
black2gray(h); /* keep table gray */
if (!weakkey) /* strong keys? */