MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / getupvalname

Function getupvalname

3rd/lua-5.4.3/src/ldebug.c:664–675  ·  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

662** upvalues.)
663*/
664static const char *getupvalname (CallInfo *ci, const TValue *o,
665 const char **name) {
666 LClosure *c = ci_func(ci);
667 int i;
668 for (i = 0; i < c->nupvalues; i++) {
669 if (c->upvals[i]->v == o) {
670 *name = upvalname(c->p, i);
671 return "upvalue";
672 }
673 }
674 return NULL;
675}
676
677
678static const char *varinfo (lua_State *L, const TValue *o) {

Callers 1

varinfoFunction · 0.85

Calls 1

upvalnameFunction · 0.85

Tested by

no test coverage detected