diff options
-rw-r--r-- | lcode.c | 4 | ||||
-rw-r--r-- | lgc.c | 4 | ||||
-rw-r--r-- | ltm.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.140 2017/11/30 13:17:06 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.140 2017/11/30 13:29:18 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1128,7 +1128,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { | |||
1128 | t->k = VINDEXSTR; | 1128 | t->k = VINDEXSTR; |
1129 | } | 1129 | } |
1130 | else if (isCint(k)) { | 1130 | else if (isCint(k)) { |
1131 | t->u.ind.idx = k->u.ival; /* integer constant */ | 1131 | t->u.ind.idx = cast_int(k->u.ival); /* integer constant in proper range */ |
1132 | t->k = VINDEXI; | 1132 | t->k = VINDEXI; |
1133 | } | 1133 | } |
1134 | else { | 1134 | else { |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.238 2017/11/07 13:25:26 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.239 2017/11/23 19:29: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 | */ |
@@ -1270,7 +1270,7 @@ static void genstep (lua_State *L, global_State *g) { | |||
1270 | lu_mem mem; | 1270 | lu_mem mem; |
1271 | youngcollection(L, g); | 1271 | youngcollection(L, g); |
1272 | mem = gettotalbytes(g); | 1272 | mem = gettotalbytes(g); |
1273 | luaE_setdebt(g, -((mem / 100) * g->genminormul)); | 1273 | luaE_setdebt(g, -(cast(l_mem, (mem / 100)) * g->genminormul)); |
1274 | g->GCestimate = majorbase; /* preserve base value */ | 1274 | g->GCestimate = majorbase; /* preserve base value */ |
1275 | } | 1275 | } |
1276 | } | 1276 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 2.49 2017/11/23 19:18:10 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 2.50 2017/11/27 17:44:31 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -237,7 +237,7 @@ void luaT_getvarargs (lua_State *L, TValue *t, StkId where, int wanted) { | |||
237 | Table *h = hvalue(t); | 237 | Table *h = hvalue(t); |
238 | if (wanted < 0) { /* get all? */ | 238 | if (wanted < 0) { /* get all? */ |
239 | const TValue *ns = luaH_getstr(h, G(L)->nfield); | 239 | const TValue *ns = luaH_getstr(h, G(L)->nfield); |
240 | int n = (ttisinteger(ns)) ? ivalue(ns) : 0; | 240 | int n = (ttisinteger(ns)) ? cast_int(ivalue(ns)) : 0; |
241 | wanted = n; | 241 | wanted = n; |
242 | checkstackp(L, n, where); | 242 | checkstackp(L, n, where); |
243 | L->top = where + n; | 243 | L->top = where + n; |