| 680 | |
| 681 | |
| 682 | static const char *varinfo (lua_State *L, const TValue *o) { |
| 683 | const char *name = NULL; /* to avoid warnings */ |
| 684 | CallInfo *ci = L->ci; |
| 685 | const char *kind = NULL; |
| 686 | if (isLua(ci)) { |
| 687 | kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ |
| 688 | if (!kind && isinstack(ci, o)) /* no? try a register */ |
| 689 | kind = getobjname(ci_func(ci)->p, currentpc(ci), |
| 690 | cast_int(cast(StkId, o) - (ci->func + 1)), &name); |
| 691 | } |
| 692 | return (kind) ? luaO_pushfstring(L, " (%s '%s')", kind, name) : ""; |
| 693 | } |
| 694 | |
| 695 | |
| 696 | l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) { |
no test coverage detected