Make metamethod names proper GC roots.

This commit is contained in:
Mike Pall
2010-04-25 18:35:47 +02:00
parent 87e4daf89c
commit ef0904e80b
12 changed files with 26 additions and 29 deletions

View File

@@ -213,7 +213,7 @@ static const char *getfuncname(lua_State *L, TValue *frame, const char **name)
if (bc_op(*ip) == BC_ITERC) slot -= 3;
return getobjname(funcproto(fn), ip, slot, name);
} else if (mm != MM_MAX) {
*name = strdata(strref(G(L)->mmname[mm]));
*name = strdata(mmname_str(G(L), mm));
return "metamethod";
} else {
return NULL;