summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lparser.c')
-rw-r--r--apps/plugins/lua/lparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/lua/lparser.c b/apps/plugins/lua/lparser.c
index 800cdb1a3b..dda7488dca 100644
--- a/apps/plugins/lua/lparser.c
+++ b/apps/plugins/lua/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.42.1.3 2007/12/28 15:32:23 roberto Exp $ 2** $Id: lparser.c,v 2.42.1.4 2011/10/21 19:31:42 roberto Exp $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -325,7 +325,7 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) {
325} 325}
326 326
327 327
328static void lparser_open_func (LexState *ls, FuncState *fs) { 328static void open_func (LexState *ls, FuncState *fs) {
329 lua_State *L = ls->L; 329 lua_State *L = ls->L;
330 Proto *f = luaF_newproto(L); 330 Proto *f = luaF_newproto(L);
331 fs->f = f; 331 fs->f = f;
@@ -374,9 +374,9 @@ static void close_func (LexState *ls) {
374 lua_assert(luaG_checkcode(f)); 374 lua_assert(luaG_checkcode(f));
375 lua_assert(fs->bl == NULL); 375 lua_assert(fs->bl == NULL);
376 ls->fs = fs->prev; 376 ls->fs = fs->prev;
377 L->top -= 2; /* remove table and prototype from the stack */
378 /* last token read was anchored in defunct function; must reanchor it */ 377 /* last token read was anchored in defunct function; must reanchor it */
379 if (fs) anchor_token(ls); 378 if (fs) anchor_token(ls);
379 L->top -= 2; /* remove table and prototype from the stack */
380} 380}
381 381
382 382
@@ -385,7 +385,7 @@ Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) {
385 struct FuncState funcstate; 385 struct FuncState funcstate;
386 lexstate.buff = buff; 386 lexstate.buff = buff;
387 luaX_setinput(L, &lexstate, z, luaS_new(L, name)); 387 luaX_setinput(L, &lexstate, z, luaS_new(L, name));
388 lparser_open_func(&lexstate, &funcstate); 388 open_func(&lexstate, &funcstate);
389 funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ 389 funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */
390 luaX_next(&lexstate); /* read first token */ 390 luaX_next(&lexstate); /* read first token */
391 chunk(&lexstate); 391 chunk(&lexstate);
@@ -576,7 +576,7 @@ static void parlist (LexState *ls) {
576static void body (LexState *ls, expdesc *e, int needself, int line) { 576static void body (LexState *ls, expdesc *e, int needself, int line) {
577 /* body -> `(' parlist `)' chunk END */ 577 /* body -> `(' parlist `)' chunk END */
578 FuncState new_fs; 578 FuncState new_fs;
579 lparser_open_func(ls, &new_fs); 579 open_func(ls, &new_fs);
580 new_fs.f->linedefined = line; 580 new_fs.f->linedefined = line;
581 checknext(ls, '('); 581 checknext(ls, '(');
582 if (needself) { 582 if (needself) {