aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llimits.h12
-rw-r--r--lvm.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/llimits.h b/llimits.h
index fc5cb276..3f037255 100644
--- a/llimits.h
+++ b/llimits.h
@@ -234,12 +234,12 @@ typedef unsigned long l_uint32;
234 234
235/* floor division (defined as 'floor(a/b)') */ 235/* floor division (defined as 'floor(a/b)') */
236#if !defined(luai_numidiv) 236#if !defined(luai_numidiv)
237#define luai_numidiv(L,a,b) ((void)L, l_floor(luai_numdiv(L,a,b))) 237#define luai_numidiv(L,a,b) l_floor(luai_numdiv(L,a,b))
238#endif 238#endif
239 239
240/* float division */ 240/* float division */
241#if !defined(luai_numdiv) 241#if !defined(luai_numdiv)
242#define luai_numdiv(L,a,b) ((a)/(b)) 242#define luai_numdiv(L,a,b) ((void)L, (a)/(b))
243#endif 243#endif
244 244
245/* 245/*
@@ -267,10 +267,10 @@ typedef unsigned long l_uint32;
267 267
268/* the others are quite standard operations */ 268/* the others are quite standard operations */
269#if !defined(luai_numadd) 269#if !defined(luai_numadd)
270#define luai_numadd(L,a,b) ((a)+(b)) 270#define luai_numadd(L,a,b) ((void)L, (a)+(b))
271#define luai_numsub(L,a,b) ((a)-(b)) 271#define luai_numsub(L,a,b) ((void)L, (a)-(b))
272#define luai_nummul(L,a,b) ((a)*(b)) 272#define luai_nummul(L,a,b) ((void)L, (a)*(b))
273#define luai_numunm(L,a) (-(a)) 273#define luai_numunm(L,a) ((void)L, -(a))
274#define luai_numeq(a,b) ((a)==(b)) 274#define luai_numeq(a,b) ((a)==(b))
275#define luai_numlt(a,b) ((a)<(b)) 275#define luai_numlt(a,b) ((a)<(b))
276#define luai_numle(a,b) ((a)<=(b)) 276#define luai_numle(a,b) ((a)<=(b))
diff --git a/lvm.c b/lvm.c
index c70e2b8a..96ae1639 100644
--- a/lvm.c
+++ b/lvm.c
@@ -268,9 +268,9 @@ static int forprep (lua_State *L, StkId ra) {
268/* 268/*
269** Execute a step of a float numerical for loop, returning 269** Execute a step of a float numerical for loop, returning
270** true iff the loop must continue. (The integer case is 270** true iff the loop must continue. (The integer case is
271** written online with opcode OP_FORLOOP, for performance.) 271** written inline with opcode OP_FORLOOP, for performance.)
272*/ 272*/
273static int floatforloop (StkId ra) { 273static int floatforloop (lua_State *L, StkId ra) {
274 lua_Number step = fltvalue(s2v(ra + 1)); 274 lua_Number step = fltvalue(s2v(ra + 1));
275 lua_Number limit = fltvalue(s2v(ra)); 275 lua_Number limit = fltvalue(s2v(ra));
276 lua_Number idx = fltvalue(s2v(ra + 2)); /* control variable */ 276 lua_Number idx = fltvalue(s2v(ra + 2)); /* control variable */
@@ -1841,7 +1841,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1841 pc -= GETARG_Bx(i); /* jump back */ 1841 pc -= GETARG_Bx(i); /* jump back */
1842 } 1842 }
1843 } 1843 }
1844 else if (floatforloop(ra)) /* float loop */ 1844 else if (floatforloop(L, ra)) /* float loop */
1845 pc -= GETARG_Bx(i); /* jump back */ 1845 pc -= GETARG_Bx(i); /* jump back */
1846 updatetrap(ci); /* allows a signal to break the loop */ 1846 updatetrap(ci); /* allows a signal to break the loop */
1847 vmbreak; 1847 vmbreak;