summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c6
-rw-r--r--lcode.h4
-rw-r--r--lparser.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/lcode.c b/lcode.c
index 8e0b443d..8a4b2ba9 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.63 2013/04/15 15:43:34 roberto Exp roberto $ 2** $Id: lcode.c,v 2.64 2013/04/16 18:46:28 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -322,14 +322,14 @@ int luaK_stringK (FuncState *fs, TString *s) {
322} 322}
323 323
324 324
325static int luaK_intK (FuncState *fs, lua_Integer n) { 325int luaK_intK (FuncState *fs, lua_Integer n) {
326 TValue o; 326 TValue o;
327 setivalue(&o, n); 327 setivalue(&o, n);
328 return addk(fs, &o, &o); 328 return addk(fs, &o, &o);
329} 329}
330 330
331 331
332int luaK_numberK (FuncState *fs, lua_Number r) { 332static int luaK_numberK (FuncState *fs, lua_Number r) {
333 int n; 333 int n;
334 lua_State *L = fs->ls->L; 334 lua_State *L = fs->ls->L;
335 TValue o; 335 TValue o;
diff --git a/lcode.h b/lcode.h
index 10f30f79..e151c436 100644
--- a/lcode.h
+++ b/lcode.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.h,v 1.57 2011/04/07 18:14:12 roberto Exp roberto $ 2** $Id: lcode.h,v 1.58 2011/08/30 16:26:41 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -52,7 +52,7 @@ LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
52LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); 52LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
53LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); 53LUAI_FUNC void luaK_checkstack (FuncState *fs, int n);
54LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); 54LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s);
55LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); 55LUAI_FUNC int luaK_intK (FuncState *fs, lua_Integer n);
56LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); 56LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e);
57LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); 57LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);
58LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e); 58LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e);
diff --git a/lparser.c b/lparser.c
index 0ac318ff..c6605762 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.130 2013/02/06 13:37:39 roberto Exp roberto $ 2** $Id: lparser.c,v 2.131 2013/04/16 18:46:28 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1326,7 +1326,7 @@ static void fornum (LexState *ls, TString *varname, int line) {
1326 if (testnext(ls, ',')) 1326 if (testnext(ls, ','))
1327 exp1(ls); /* optional step */ 1327 exp1(ls); /* optional step */
1328 else { /* default step = 1 */ 1328 else { /* default step = 1 */
1329 luaK_codek(fs, fs->freereg, luaK_numberK(fs, 1)); 1329 luaK_codek(fs, fs->freereg, luaK_intK(fs, 1));
1330 luaK_reserveregs(fs, 1); 1330 luaK_reserveregs(fs, 1);
1331 } 1331 }
1332 forbody(ls, base, line, 1, 1); 1332 forbody(ls, base, line, 1, 1);