diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-22 14:19:56 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-22 14:19:56 -0200 |
commit | c505f341d638f8f0adcef4df85bcc8def6c930a3 (patch) | |
tree | bfa689a7545e47cfd154066cd8d962daa6bc611e /lvm.c | |
parent | 428325baecb2f514ea3eb6c87405f93872fb8430 (diff) | |
download | lua-c505f341d638f8f0adcef4df85bcc8def6c930a3.tar.gz lua-c505f341d638f8f0adcef4df85bcc8def6c930a3.tar.bz2 lua-c505f341d638f8f0adcef4df85bcc8def6c930a3.zip |
small changes in casts
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.58 2005/10/24 17:37:52 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.59 2005/11/01 16:08:45 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -509,11 +509,11 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
509 | const TValue *rb = RB(i); | 509 | const TValue *rb = RB(i); |
510 | switch (ttype(rb)) { | 510 | switch (ttype(rb)) { |
511 | case LUA_TTABLE: { | 511 | case LUA_TTABLE: { |
512 | setnvalue(ra, cast(lua_Number, luaH_getn(hvalue(rb)))); | 512 | setnvalue(ra, cast_num(luaH_getn(hvalue(rb)))); |
513 | break; | 513 | break; |
514 | } | 514 | } |
515 | case LUA_TSTRING: { | 515 | case LUA_TSTRING: { |
516 | setnvalue(ra, cast(lua_Number, tsvalue(rb)->len)); | 516 | setnvalue(ra, cast_num(tsvalue(rb)->len)); |
517 | break; | 517 | break; |
518 | } | 518 | } |
519 | default: { /* try metamethod */ | 519 | default: { /* try metamethod */ |
@@ -693,10 +693,10 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
693 | int last; | 693 | int last; |
694 | Table *h; | 694 | Table *h; |
695 | if (n == 0) { | 695 | if (n == 0) { |
696 | n = cast(int, L->top - ra) - 1; | 696 | n = cast_int(L->top - ra) - 1; |
697 | L->top = L->ci->top; | 697 | L->top = L->ci->top; |
698 | } | 698 | } |
699 | if (c == 0) c = cast(int, *pc++); | 699 | if (c == 0) c = cast_int(*pc++); |
700 | runtime_check(L, ttistable(ra)); | 700 | runtime_check(L, ttistable(ra)); |
701 | h = hvalue(ra); | 701 | h = hvalue(ra); |
702 | last = ((c-1)*LFIELDS_PER_FLUSH) + n; | 702 | last = ((c-1)*LFIELDS_PER_FLUSH) + n; |
@@ -737,7 +737,7 @@ void luaV_execute (lua_State *L, int nexeccalls) { | |||
737 | int b = GETARG_B(i) - 1; | 737 | int b = GETARG_B(i) - 1; |
738 | int j; | 738 | int j; |
739 | CallInfo *ci = L->ci; | 739 | CallInfo *ci = L->ci; |
740 | int n = cast(int, ci->base - ci->func) - cl->p->numparams - 1; | 740 | int n = cast_int(ci->base - ci->func) - cl->p->numparams - 1; |
741 | if (b == LUA_MULTRET) { | 741 | if (b == LUA_MULTRET) { |
742 | Protect(luaD_checkstack(L, n)); | 742 | Protect(luaD_checkstack(L, n)); |
743 | ra = RA(i); /* previous call may change the stack */ | 743 | ra = RA(i); /* previous call may change the stack */ |