diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-04 16:33:40 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-12-04 16:33:40 -0200 |
commit | 4894c2796277b47b0ffc8983e8231d2cc95ee09b (patch) | |
tree | dc702c79716a42f22301bc5b9b5798a28173f7c2 /lvm.c | |
parent | 10ac68c648e0e1d23fe5485bc711df8fc71b6ae3 (diff) | |
download | lua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.tar.gz lua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.tar.bz2 lua-4894c2796277b47b0ffc8983e8231d2cc95ee09b.zip |
lua_Number defined in lua.h (1st version)
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.146 2000/10/26 12:47:05 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.147 2000/11/24 17:39:56 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 | */ |
@@ -402,7 +402,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) { | |||
402 | } | 402 | } |
403 | case OP_PUSHINT: { | 403 | case OP_PUSHINT: { |
404 | ttype(top) = LUA_TNUMBER; | 404 | ttype(top) = LUA_TNUMBER; |
405 | nvalue(top) = (Number)GETARG_S(i); | 405 | nvalue(top) = (lua_Number)GETARG_S(i); |
406 | top++; | 406 | top++; |
407 | break; | 407 | break; |
408 | } | 408 | } |
@@ -523,11 +523,11 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) { | |||
523 | case OP_ADDI: { | 523 | case OP_ADDI: { |
524 | if (tonumber(top-1)) { | 524 | if (tonumber(top-1)) { |
525 | ttype(top) = LUA_TNUMBER; | 525 | ttype(top) = LUA_TNUMBER; |
526 | nvalue(top) = (Number)GETARG_S(i); | 526 | nvalue(top) = (lua_Number)GETARG_S(i); |
527 | call_arith(L, top+1, TM_ADD); | 527 | call_arith(L, top+1, TM_ADD); |
528 | } | 528 | } |
529 | else | 529 | else |
530 | nvalue(top-1) += (Number)GETARG_S(i); | 530 | nvalue(top-1) += (lua_Number)GETARG_S(i); |
531 | break; | 531 | break; |
532 | } | 532 | } |
533 | case OP_SUB: { | 533 | case OP_SUB: { |