diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.22 2005/11/16 11:55:27 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.23 2005/11/25 13:29:32 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 | */ |
@@ -196,7 +196,7 @@ void luaK_checkstack (FuncState *fs, int n) { | |||
196 | if (newstack > fs->f->maxstacksize) { | 196 | if (newstack > fs->f->maxstacksize) { |
197 | if (newstack >= MAXSTACK) | 197 | if (newstack >= MAXSTACK) |
198 | luaX_syntaxerror(fs->ls, "function or expression too complex"); | 198 | luaX_syntaxerror(fs->ls, "function or expression too complex"); |
199 | fs->f->maxstacksize = cast(lu_byte, newstack); | 199 | fs->f->maxstacksize = cast_byte(newstack); |
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
@@ -227,11 +227,11 @@ static int addk (FuncState *fs, TValue *k, TValue *v) { | |||
227 | Proto *f = fs->f; | 227 | Proto *f = fs->f; |
228 | int oldsize = f->sizek; | 228 | int oldsize = f->sizek; |
229 | if (ttisnumber(idx)) { | 229 | if (ttisnumber(idx)) { |
230 | lua_assert(luaO_rawequalObj(&fs->f->k[cast(int, nvalue(idx))], v)); | 230 | lua_assert(luaO_rawequalObj(&fs->f->k[cast_int(nvalue(idx))], v)); |
231 | return cast(int, nvalue(idx)); | 231 | return cast_int(nvalue(idx)); |
232 | } | 232 | } |
233 | else { /* constant not found; create a new entry */ | 233 | else { /* constant not found; create a new entry */ |
234 | setnvalue(idx, cast(lua_Number, fs->nk)); | 234 | setnvalue(idx, cast_num(fs->nk)); |
235 | luaM_growvector(L, f->k, fs->nk, f->sizek, TValue, | 235 | luaM_growvector(L, f->k, fs->nk, f->sizek, TValue, |
236 | MAXARG_Bx, "constant table overflow"); | 236 | MAXARG_Bx, "constant table overflow"); |
237 | while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); | 237 | while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); |