summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
commit0d88545b82b82671904474499b5d312141170ab6 (patch)
tree5a924d4d492dd987a5480a15cd1d12947089db85 /lgc.c
parentf84c5a5fc68f83b3adad37919e0096ea3c7f4129 (diff)
downloadlua-github-0d88545b82b82671904474499b5d312141170ab6.tar.gz
warnings from several compilers (mainly typecasts when lua_Number is float)
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lgc.c b/lgc.c
index 71cacd1d..fe9bed2d 100644
--- a/lgc.c
+++ b/lgc.c
@@ -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;