diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-23 10:13:10 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-02-23 10:13:10 -0300 |
commit | 7482e8f914fbf198af02c2970cf0aadd80740f92 (patch) | |
tree | 56578e184ca11939edc00272d63bc801e2b67a5a /ldo.c | |
parent | 03b769053a4288742fb4739fa47508ec735e2036 (diff) | |
download | lua-7482e8f914fbf198af02c2970cf0aadd80740f92.tar.gz lua-7482e8f914fbf198af02c2970cf0aadd80740f92.tar.bz2 lua-7482e8f914fbf198af02c2970cf0aadd80740f92.zip |
no need of lookahead in Zio
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.91 2011/02/04 17:34:43 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.92 2011/02/07 17:14:50 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -625,10 +625,10 @@ static void f_parser (lua_State *L, void *ud) { | |||
625 | Proto *tf; | 625 | Proto *tf; |
626 | Closure *cl; | 626 | Closure *cl; |
627 | struct SParser *p = cast(struct SParser *, ud); | 627 | struct SParser *p = cast(struct SParser *, ud); |
628 | int c = luaZ_lookahead(p->z); | 628 | int c = zgetc(p->z); /* read first character */ |
629 | tf = (c == LUA_SIGNATURE[0]) | 629 | tf = (c == LUA_SIGNATURE[0]) |
630 | ? luaU_undump(L, p->z, &p->buff, p->name) | 630 | ? luaU_undump(L, p->z, &p->buff, p->name) |
631 | : luaY_parser(L, p->z, &p->buff, &p->dyd, p->name); | 631 | : luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); |
632 | setptvalue2s(L, L->top, tf); | 632 | setptvalue2s(L, L->top, tf); |
633 | incr_top(L); | 633 | incr_top(L); |
634 | cl = luaF_newLclosure(L, tf); | 634 | cl = luaF_newLclosure(L, tf); |