MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getfuncname

Function getfuncname

Source/Misc/lua/src/lua.c:5052–5063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5050
5051
5052static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
5053Instruction i;
5054if ((isLua(ci) && ci->tailcalls > 0) || !isLua(ci - 1))
5055return NULL; /* calling function is not Lua (or is unknown) */
5056ci--; /* calling function */
5057i = ci_func(ci)->l.p->code[currentpc(L, ci)];
5058if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL ||
5059GET_OPCODE(i) == OP_TFORLOOP)
5060return getobjname(L, ci, GETARG_A(i), name);
5061else
5062return NULL; /* no useful name can be found */
5063}
5064
5065
5066/* 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