diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-04-03 10:35:34 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-04-03 10:35:34 -0300 |
commit | 0d88545b82b82671904474499b5d312141170ab6 (patch) | |
tree | 5a924d4d492dd987a5480a15cd1d12947089db85 /lgc.c | |
parent | f84c5a5fc68f83b3adad37919e0096ea3c7f4129 (diff) | |
download | lua-0d88545b82b82671904474499b5d312141170ab6.tar.gz lua-0d88545b82b82671904474499b5d312141170ab6.tar.bz2 lua-0d88545b82b82671904474499b5d312141170ab6.zip |
warnings from several compilers (mainly typecasts when lua_Number is float)
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 1.169 2003/02/11 10:46:24 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 1.170 2003/03/18 12:50:04 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 | */ |
@@ -158,7 +158,8 @@ static void traversetable (GCState *st, Table *h) { | |||
158 | if (weakkey || weakvalue) { /* is really weak? */ | 158 | if (weakkey || weakvalue) { /* is really weak? */ |
159 | GCObject **weaklist; | 159 | GCObject **weaklist; |
160 | h->marked &= ~(KEYWEAK | VALUEWEAK); /* clear bits */ | 160 | h->marked &= ~(KEYWEAK | VALUEWEAK); /* clear bits */ |
161 | h->marked |= (weakkey << KEYWEAKBIT) | (weakvalue << VALUEWEAKBIT); | 161 | h->marked |= cast(lu_byte, (weakkey << KEYWEAKBIT) | |
162 | (weakvalue << VALUEWEAKBIT)); | ||
162 | weaklist = (weakkey && weakvalue) ? &st->wkv : | 163 | weaklist = (weakkey && weakvalue) ? &st->wkv : |
163 | (weakkey) ? &st->wk : | 164 | (weakkey) ? &st->wk : |
164 | &st->wv; | 165 | &st->wv; |