MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / varinfo

Function varinfo

third-party/lua-5.3.5/src/ldebug.c:571–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569
570
571static 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
585l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {

Callers 2

luaG_typeerrorFunction · 0.70
luaG_tointerrorFunction · 0.70

Calls 5

getupvalnameFunction · 0.70
isinstackFunction · 0.70
getobjnameFunction · 0.70
currentpcFunction · 0.70
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected