| 570 | |
| 571 | |
| 572 | static const char *varinfo (lua_State *L, const TValue *o) { |
| 573 | const char *name = NULL; /* to avoid warnings */ |
| 574 | CallInfo *ci = L->ci; |
| 575 | const char *kind = NULL; |
| 576 | if (isLua(ci)) { |
| 577 | kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ |
| 578 | if (!kind && isinstack(ci, o)) /* no? try a register */ |
| 579 | kind = getobjname(ci_func(ci)->p, currentpc(ci), |
| 580 | cast_int(o - ci->u.l.base), &name); |
| 581 | } |
| 582 | return (kind) ? luaO_pushfstring(L, " (%s '%s')", kind, name) : ""; |
| 583 | } |
| 584 | |
| 585 | |
| 586 | l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) { |
no test coverage detected