aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lparser.c b/lparser.c
index 0637a0b7..3eb83fba 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.166 2017/09/28 16:53:29 roberto Exp roberto $ 2** $Id: lparser.c,v 2.167 2017/10/04 21:53:03 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*/
@@ -330,11 +330,7 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
330} 330}
331 331
332 332
333static void enterlevel (LexState *ls) { 333#define enterlevel(ls) luaE_incCcalls((ls)->L)
334 lua_State *L = ls->L;
335 ++L->nCcalls;
336 checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "C levels");
337}
338 334
339 335
340#define leavelevel(ls) ((ls)->L->nCcalls--) 336#define leavelevel(ls) ((ls)->L->nCcalls--)
@@ -1188,9 +1184,9 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {
1188 suffixedexp(ls, &nv.v); 1184 suffixedexp(ls, &nv.v);
1189 if (!vkisindexed(nv.v.k)) 1185 if (!vkisindexed(nv.v.k))
1190 check_conflict(ls, lh, &nv.v); 1186 check_conflict(ls, lh, &nv.v);
1191 checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS, 1187 luaE_incCcalls(ls->L); /* control recursion depth */
1192 "C levels");
1193 assignment(ls, &nv, nvars+1); 1188 assignment(ls, &nv, nvars+1);
1189 ls->L->nCcalls--;
1194 } 1190 }
1195 else { /* assignment -> '=' explist */ 1191 else { /* assignment -> '=' explist */
1196 int nexps; 1192 int nexps;