diff options
| author | Lua Team <team@lua.org> | 2006-01-12 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2006-01-12 12:00:00 +0000 |
| commit | 4f266285f998d0d14c4e83cc29772f0de1a7fbba (patch) | |
| tree | a122a829730d9f96e3a4e2bf65347490a8759800 /src/lvm.c | |
| parent | b3196343ba1a5dfe10e68eb9c61dc0ad5bb961a8 (diff) | |
| download | lua-github-5.1-rc1.tar.gz | |
Lua 5.1-rc15.1-rc1
Diffstat (limited to 'src/lvm.c')
| -rw-r--r-- | src/lvm.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.59 2005/11/01 16:08:45 roberto Exp $ +** $Id: lvm.c,v 2.61 2006/01/10 12:50:00 roberto Exp $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -509,16 +509,16 @@ void luaV_execute (lua_State *L, int nexeccalls) { const TValue *rb = RB(i); switch (ttype(rb)) { case LUA_TTABLE: { - setnvalue(ra, cast(lua_Number, luaH_getn(hvalue(rb)))); + setnvalue(ra, cast_num(luaH_getn(hvalue(rb)))); break; } case LUA_TSTRING: { - setnvalue(ra, cast(lua_Number, tsvalue(rb)->len)); + setnvalue(ra, cast_num(tsvalue(rb)->len)); break; } default: { /* try metamethod */ Protect( - if (!call_binTM(L, rb, &luaO_nilobject, ra, TM_LEN)) + if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN)) luaG_typeerror(L, rb, "get length of"); ) } @@ -693,10 +693,10 @@ void luaV_execute (lua_State *L, int nexeccalls) { int last; Table *h; if (n == 0) { - n = cast(int, L->top - ra) - 1; + n = cast_int(L->top - ra) - 1; L->top = L->ci->top; } - if (c == 0) c = cast(int, *pc++); + if (c == 0) c = cast_int(*pc++); runtime_check(L, ttistable(ra)); h = hvalue(ra); last = ((c-1)*LFIELDS_PER_FLUSH) + n; @@ -737,7 +737,7 @@ void luaV_execute (lua_State *L, int nexeccalls) { int b = GETARG_B(i) - 1; int j; CallInfo *ci = L->ci; - int n = cast(int, ci->base - ci->func) - cl->p->numparams - 1; + int n = cast_int(ci->base - ci->func) - cl->p->numparams - 1; if (b == LUA_MULTRET) { Protect(luaD_checkstack(L, n)); ra = RA(i); /* previous call may change the stack */ |
