MCPcopy Create free account
hub / github.com/DFHack/dfhack / getupvalname

Function getupvalname

depends/lua/src/ldebug.c:558–569  ·  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

556** upvalues.)
557*/
558static const char *getupvalname (CallInfo *ci, const TValue *o,
559 const char **name) {
560 LClosure *c = ci_func(ci);
561 int i;
562 for (i = 0; i < c->nupvalues; i++) {
563 if (c->upvals[i]->v == o) {
564 *name = upvalname(c->p, i);
565 return "upvalue";
566 }
567 }
568 return NULL;
569}
570
571
572static 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