aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lparser.c b/lparser.c
index 349cfd10..4a2372d3 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.44 2006/07/11 15:53:29 roberto Exp roberto $ 2** $Id: lparser.c,v 2.45 2006/07/12 19:02:50 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*/
@@ -73,7 +73,7 @@ static void errorlimit (FuncState *fs, int limit, const char *what) {
73 luaO_pushfstring(fs->L, "main function has more than %d %s", limit, what) : 73 luaO_pushfstring(fs->L, "main function has more than %d %s", limit, what) :
74 luaO_pushfstring(fs->L, "function at line %d has more than %d %s", 74 luaO_pushfstring(fs->L, "function at line %d has more than %d %s",
75 fs->f->linedefined, limit, what); 75 fs->f->linedefined, limit, what);
76 luaX_lexerror(fs->ls, msg, 0); 76 luaX_lexerror(fs->ls, msg, fs->ls->t.token);
77} 77}
78 78
79 79
@@ -274,12 +274,13 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
274 274
275 275
276static void enterlevel (LexState *ls) { 276static void enterlevel (LexState *ls) {
277 ++ls->L->nCcalls; 277 global_State *g = G(ls->L);
278 luaY_checklimit(ls->fs, ls->L->nCcalls, LUAI_MAXCCALLS, "syntax levels"); 278 ++g->nCcalls;
279 luaY_checklimit(ls->fs, g->nCcalls, LUAI_MAXCCALLS, "syntax levels");
279} 280}
280 281
281 282
282#define leavelevel(ls) ((ls)->L->nCcalls--) 283#define leavelevel(ls) (G((ls)->L)->nCcalls--)
283 284
284 285
285static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isbreakable) { 286static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isbreakable) {