aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-01-23 17:51:43 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-01-23 17:51:43 -0200
commit9e6e43984da7c9c382fbd47badb4808e6fae96d3 (patch)
treefb73945627046f4be3a3109834a18d83e24b62b4
parentbaffc37f5c8d15c03da0ce689bdecadc1219fe99 (diff)
downloadlua-9e6e43984da7c9c382fbd47badb4808e6fae96d3.tar.gz
lua-9e6e43984da7c9c382fbd47badb4808e6fae96d3.tar.bz2
lua-9e6e43984da7c9c382fbd47badb4808e6fae96d3.zip
details
-rw-r--r--luaconf.h3
-rw-r--r--lvm.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/luaconf.h b/luaconf.h
index 3a588164..9c322807 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.77 2005/12/27 17:12:00 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.78 2006/01/13 19:36:28 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -488,6 +488,7 @@
488** =================================================================== 488** ===================================================================
489*/ 489*/
490 490
491#define LUA_NUMBER_DOUBLE
491#define LUA_NUMBER double 492#define LUA_NUMBER double
492 493
493/* 494/*
diff --git a/lvm.c b/lvm.c
index 14902df9..834dd432 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.60 2005/12/22 16:19:56 roberto Exp roberto $ 2** $Id: lvm.c,v 2.61 2006/01/10 12:50:00 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*/
@@ -95,7 +95,8 @@ static void callTMres (lua_State *L, StkId res, const TValue *f,
95 95
96 96
97 97
98static void callTM (lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, const TValue *p3) { 98static void callTM (lua_State *L, const TValue *f, const TValue *p1,
99 const TValue *p2, const TValue *p3) {
99 setobj2s(L, L->top, f); /* push function */ 100 setobj2s(L, L->top, f); /* push function */
100 setobj2s(L, L->top+1, p1); /* 1st argument */ 101 setobj2s(L, L->top+1, p1); /* 1st argument */
101 setobj2s(L, L->top+2, p2); /* 2nd argument */ 102 setobj2s(L, L->top+2, p2); /* 2nd argument */
@@ -649,7 +650,8 @@ void luaV_execute (lua_State *L, int nexeccalls) {
649 lua_Number step = nvalue(ra+2); 650 lua_Number step = nvalue(ra+2);
650 lua_Number idx = luai_numadd(nvalue(ra), step); /* increment index */ 651 lua_Number idx = luai_numadd(nvalue(ra), step); /* increment index */
651 lua_Number limit = nvalue(ra+1); 652 lua_Number limit = nvalue(ra+1);
652 if (step > 0 ? luai_numle(idx, limit) : luai_numle(limit, idx)) { 653 if (luai_numlt(0, step) ? luai_numle(idx, limit)
654 : luai_numle(limit, idx)) {
653 dojump(L, pc, GETARG_sBx(i)); /* jump back */ 655 dojump(L, pc, GETARG_sBx(i)); /* jump back */
654 setnvalue(ra, idx); /* update internal index... */ 656 setnvalue(ra, idx); /* update internal index... */
655 setnvalue(ra+3, idx); /* ...and external index */ 657 setnvalue(ra+3, idx); /* ...and external index */