MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getupvalname

Function getupvalname

lib/lua/src/ldebug.c:697–708  ·  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

695** upvalues.)
696*/
697static const char *getupvalname (CallInfo *ci, const TValue *o,
698 const char **name) {
699 LClosure *c = ci_func(ci);
700 int i;
701 for (i = 0; i < c->nupvalues; i++) {
702 if (c->upvals[i]->v.p == o) {
703 *name = upvalname(c->p, i);
704 return "upvalue";
705 }
706 }
707 return NULL;
708}
709
710
711static const char *formatvarinfo (lua_State *L, const char *kind,

Callers 1

varinfoFunction · 0.85

Calls 1

upvalnameFunction · 0.85

Tested by

no test coverage detected