32/64 bit memory ref cleanup, part 4: GCproto ->varinfo.

This commit is contained in:
Mike Pall
2010-02-05 01:35:38 +01:00
parent 8dcc4364cf
commit a0914c409b
5 changed files with 21 additions and 15 deletions

View File

@@ -138,9 +138,9 @@ static BCLine currentline(lua_State *L, GCfunc *fn, cTValue *nextframe)
static const char *getvarname(const GCproto *pt, BCPos pc, BCReg slot)
{
MSize i;
for (i = 0; i < pt->sizevarinfo && pt->varinfo[i].startpc <= pc; i++)
if (pc < pt->varinfo[i].endpc && slot-- == 0)
return strdata(pt->varinfo[i].name);
for (i = 0; i < pt->sizevarinfo && proto_varinfo(pt)[i].startpc <= pc; i++)
if (pc < proto_varinfo(pt)[i].endpc && slot-- == 0)
return strdata(gco2str(gcref(proto_varinfo(pt)[i].name)));
return NULL;
}