diff options
author | niemeyer <devnull@localhost> | 2004-03-19 21:14:32 +0000 |
---|---|---|
committer | niemeyer <devnull@localhost> | 2004-03-19 21:14:32 +0000 |
commit | fa111e33baa1443d7d84b0872234e60f46ab948f (patch) | |
tree | f362091fc9585e9700ed80a23424ff4af690890b /lua/lparser.c | |
parent | 635edd95230e17e8ada5793719d7e385e729df30 (diff) | |
download | librpm-tizen-fa111e33baa1443d7d84b0872234e60f46ab948f.tar.gz librpm-tizen-fa111e33baa1443d7d84b0872234e60f46ab948f.tar.bz2 librpm-tizen-fa111e33baa1443d7d84b0872234e60f46ab948f.zip |
Upgrading to Lua 5.0.2.
CVS patchset: 7179
CVS date: 2004/03/19 21:14:32
Diffstat (limited to 'lua/lparser.c')
-rw-r--r-- | lua/lparser.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lua/lparser.c b/lua/lparser.c index 35fd6d300..81341bf92 100644 --- a/lua/lparser.c +++ b/lua/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.1 2004/03/16 21:58:30 niemeyer Exp $ +** $Id: lparser.c,v 1.2 2004/03/19 21:14:32 niemeyer Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -1141,11 +1141,15 @@ static void ifstat (LexState *ls, int line) { static void localfunc (LexState *ls) { expdesc v, b; + FuncState *fs = ls->fs; new_localvar(ls, str_checkname(ls), 0); - init_exp(&v, VLOCAL, ls->fs->freereg++); + init_exp(&v, VLOCAL, fs->freereg); + luaK_reserveregs(fs, 1); adjustlocalvars(ls, 1); body(ls, &b, 0, ls->linenumber); - luaK_storevar(ls->fs, &v, &b); + luaK_storevar(fs, &v, &b); + /* debug information will only see the variable after this point! */ + getlocvar(fs, fs->nactvar - 1).startpc = fs->pc; } |