diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-19 15:27:20 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-19 15:27:20 -0300 |
| commit | 89b56e7d84d84de58fcc9d540c2003c6c2f8c134 (patch) | |
| tree | 85ba9c3aa3cdb5ff57fd4f82bf322fb2e75e7292 /lparser.c | |
| parent | 14929f5764a7990dfb62c8792cfdfe03c061da21 (diff) | |
| download | lua-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.tar.gz lua-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.tar.bz2 lua-89b56e7d84d84de58fcc9d540c2003c6c2f8c134.zip | |
more precision between closure types ('LClosure' x 'CClosure')
Diffstat (limited to 'lparser.c')
| -rw-r--r-- | lparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 2.137 2013/12/18 14:12:03 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.138 2013/12/30 20:47:58 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 | */ |
| @@ -1618,17 +1618,17 @@ static void mainfunc (LexState *ls, FuncState *fs) { | |||
| 1618 | } | 1618 | } |
| 1619 | 1619 | ||
| 1620 | 1620 | ||
| 1621 | Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, | 1621 | LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, |
| 1622 | Dyndata *dyd, const char *name, int firstchar) { | 1622 | Dyndata *dyd, const char *name, int firstchar) { |
| 1623 | LexState lexstate; | 1623 | LexState lexstate; |
| 1624 | FuncState funcstate; | 1624 | FuncState funcstate; |
| 1625 | Closure *cl = luaF_newLclosure(L, 1); /* create main closure */ | 1625 | LClosure *cl = luaF_newLclosure(L, 1); /* create main closure */ |
| 1626 | setclLvalue(L, L->top, cl); /* anchor it (to avoid being collected) */ | 1626 | setclLvalue(L, L->top, cl); /* anchor it (to avoid being collected) */ |
| 1627 | incr_top(L); | 1627 | incr_top(L); |
| 1628 | lexstate.h = luaH_new(L); /* create table for scanner */ | 1628 | lexstate.h = luaH_new(L); /* create table for scanner */ |
| 1629 | sethvalue(L, L->top, lexstate.h); /* anchor it */ | 1629 | sethvalue(L, L->top, lexstate.h); /* anchor it */ |
| 1630 | incr_top(L); | 1630 | incr_top(L); |
| 1631 | funcstate.f = cl->l.p = luaF_newproto(L); | 1631 | funcstate.f = cl->p = luaF_newproto(L); |
| 1632 | funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ | 1632 | funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ |
| 1633 | luaC_objbarrier(L, funcstate.f, funcstate.f->source); | 1633 | luaC_objbarrier(L, funcstate.f, funcstate.f->source); |
| 1634 | lexstate.buff = buff; | 1634 | lexstate.buff = buff; |
