warnings from several compilers (mainly typecasts when lua_Number is float)

This commit is contained in:
Roberto Ierusalimschy
2003-04-03 10:35:34 -03:00
parent f84c5a5fc6
commit 0d88545b82
17 changed files with 100 additions and 100 deletions

5
lgc.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 1.169 2003/02/11 10:46:24 roberto Exp roberto $
** $Id: lgc.c,v 1.170 2003/03/18 12:50:04 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -158,7 +158,8 @@ static void traversetable (GCState *st, Table *h) {
if (weakkey || weakvalue) { /* is really weak? */
GCObject **weaklist;
h->marked &= ~(KEYWEAK | VALUEWEAK); /* clear bits */
h->marked |= (weakkey << KEYWEAKBIT) | (weakvalue << VALUEWEAKBIT);
h->marked |= cast(lu_byte, (weakkey << KEYWEAKBIT) |
(weakvalue << VALUEWEAKBIT));
weaklist = (weakkey && weakvalue) ? &st->wkv :
(weakkey) ? &st->wk :
&st->wv;