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