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

Function getupvalname

third-party/lua-5.4.6/src/ldebug.c:706–717  ·  view source on GitHub ↗

** Checks whether value 'o' came from an upvalue. (That can only happen ** with instructions OP_GETTABUP/OP_SETTABUP, which operate directly on ** upvalues.) */

Source from the content-addressed store, hash-verified

704** upvalues.)
705*/
706static const char *getupvalname (CallInfo *ci, const TValue *o,
707 const char **name) {
708 LClosure *c = ci_func(ci);
709 int i;
710 for (i = 0; i < c->nupvalues; i++) {
711 if (c->upvals[i]->v.p == o) {
712 *name = upvalname(c->p, i);
713 return strupval;
714 }
715 }
716 return NULL;
717}
718
719
720static const char *formatvarinfo (lua_State *L, const char *kind,

Callers 1

varinfoFunction · 0.70

Calls 1

upvalnameFunction · 0.70

Tested by

no test coverage detected