summaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-07-18 09:17:54 -0300
commit56137d58ff7abe8cb22ee3469366e08888c84f28 (patch)
tree6769e3c2403a69cf3f0d6dbf6fb4acb7442367e0 /lparser.c
parent9aec500a2691d2b13c307d143868c8a4fab33220 (diff)
downloadlua-github-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.gz
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lparser.c b/lparser.c
index 9ad4b8db..5fec4583 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 2.138 2013/12/30 20:47:58 roberto Exp roberto $
+** $Id: lparser.c,v 2.139 2014/06/19 18:27:20 roberto Exp roberto $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -164,7 +164,7 @@ static int registerlocalvar (LexState *ls, TString *varname) {
LocVar, SHRT_MAX, "local variables");
while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;
f->locvars[fs->nlocvars].varname = varname;
- luaC_objbarrier(ls->L, f, varname);
+ luaC_objbarrier(ls->L, f, ts2gco(varname));
return fs->nlocvars++;
}
@@ -232,7 +232,7 @@ static int newupvalue (FuncState *fs, TString *name, expdesc *v) {
f->upvalues[fs->nups].instack = (v->k == VLOCAL);
f->upvalues[fs->nups].idx = cast_byte(v->u.info);
f->upvalues[fs->nups].name = name;
- luaC_objbarrier(fs->ls->L, f, name);
+ luaC_objbarrier(fs->ls->L, f, ts2gco(name));
return fs->nups++;
}
@@ -1630,7 +1630,7 @@ LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
incr_top(L);
funcstate.f = cl->p = luaF_newproto(L);
funcstate.f->source = luaS_new(L, name); /* create and anchor TString */
- luaC_objbarrier(L, funcstate.f, funcstate.f->source);
+ luaC_objbarrier(L, funcstate.f, ts2gco(funcstate.f->source));
lexstate.buff = buff;
lexstate.dyd = dyd;
dyd->actvar.n = dyd->gt.n = dyd->label.n = 0;