MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / getfuncname

Function getfuncname

lua/ldebug.c:549–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547
548
549static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
550 Instruction i;
551 if ((isLua(ci) && ci->tailcalls > 0) || !isLua(ci - 1))
552 return NULL; /* calling function is not Lua (or is unknown) */
553 ci--; /* calling function */
554 i = ci_func(ci)->l.p->code[currentpc(L, ci)];
555 if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL ||
556 GET_OPCODE(i) == OP_TFORLOOP)
557 return getobjname(L, ci, GETARG_A(i), name);
558 else
559 return NULL; /* no useful name can be found */
560}
561
562
563/* only ANSI way to check whether a pointer points to an array */

Callers 1

auxgetinfoFunction · 0.85

Calls 2

currentpcFunction · 0.85
getobjnameFunction · 0.85

Tested by

no test coverage detected