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

Function getupvalname

third-party/lua-5.5.0/src/ldebug.c:701–712  ·  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

699** upvalues.)
700*/
701static const char *getupvalname (CallInfo *ci, const TValue *o,
702 const char **name) {
703 LClosure *c = ci_func(ci);
704 int i;
705 for (i = 0; i < c->nupvalues; i++) {
706 if (c->upvals[i]->v.p == o) {
707 *name = upvalname(c->p, i);
708 return strupval;
709 }
710 }
711 return NULL;
712}
713
714
715static 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