MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getupvalname

Function getupvalname

extlibs/lua/src/ldebug.c:668–679  ·  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

666** upvalues.)
667*/
668static const char *getupvalname (CallInfo *ci, const TValue *o,
669 const char **name) {
670 LClosure *c = ci_func(ci);
671 int i;
672 for (i = 0; i < c->nupvalues; i++) {
673 if (c->upvals[i]->v == o) {
674 *name = upvalname(c->p, i);
675 return "upvalue";
676 }
677 }
678 return NULL;
679}
680
681
682static 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