diff options
| author | William Wilgus <me.theuser@yahoo.com> | 2018-11-08 11:32:45 -0500 |
|---|---|---|
| committer | William Wilgus <me.theuser@yahoo.com> | 2018-11-11 19:42:30 -0500 |
| commit | b69faf0bcc5ddca1d88b1a7ab47bcbbc6dbb9af1 (patch) | |
| tree | 191277cab3ef773238c1e91dafaaea04ddca1949 /apps/plugins/lua/lparser.c | |
| parent | de6618a2713ef26f888762cbe6539cc65a393c7c (diff) | |
| download | rockbox-b69faf0bcc5ddca1d88b1a7ab47bcbbc6dbb9af1.zip rockbox-b69faf0bcc5ddca1d88b1a7ab47bcbbc6dbb9af1.tar.gz rockbox-b69faf0bcc5ddca1d88b1a7ab47bcbbc6dbb9af1.tar.bz2 rockbox-b69faf0bcc5ddca1d88b1a7ab47bcbbc6dbb9af1.tar.xz | |
lua update to 5.1.5
Modify Rocklua towards upstream 5.1.5
Clean up some of the Rocklua implementation
Change-Id: Iac722e827899cf84f5ca004ef7ae7ddce5f7fbbe
Diffstat (limited to 'apps/plugins/lua/lparser.c')
| -rw-r--r-- | apps/plugins/lua/lparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/lua/lparser.c b/apps/plugins/lua/lparser.c index 800cdb1..dda7488 100644 --- a/apps/plugins/lua/lparser.c +++ b/apps/plugins/lua/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.42.1.3 2007/12/28 15:32:23 roberto Exp $ +** $Id: lparser.c,v 2.42.1.4 2011/10/21 19:31:42 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -325,7 +325,7 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) { } -static void lparser_open_func (LexState *ls, FuncState *fs) { +static void open_func (LexState *ls, FuncState *fs) { lua_State *L = ls->L; Proto *f = luaF_newproto(L); fs->f = f; @@ -374,9 +374,9 @@ static void close_func (LexState *ls) { lua_assert(luaG_checkcode(f)); lua_assert(fs->bl == NULL); ls->fs = fs->prev; - L->top -= 2; /* remove table and prototype from the stack */ /* last token read was anchored in defunct function; must reanchor it */ if (fs) anchor_token(ls); + L->top -= 2; /* remove table and prototype from the stack */ } @@ -385,7 +385,7 @@ Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { struct FuncState funcstate; lexstate.buff = buff; luaX_setinput(L, &lexstate, z, luaS_new(L, name)); - lparser_open_func(&lexstate, &funcstate); + open_func(&lexstate, &funcstate); funcstate.f->is_vararg = VARARG_ISVARARG; /* main func. is always vararg */ luaX_next(&lexstate); /* read first token */ chunk(&lexstate); @@ -576,7 +576,7 @@ static void parlist (LexState *ls) { static void body (LexState *ls, expdesc *e, int needself, int line) { /* body -> `(' parlist `)' chunk END */ FuncState new_fs; - lparser_open_func(ls, &new_fs); + open_func(ls, &new_fs); new_fs.f->linedefined = line; checknext(ls, '('); if (needself) { |