MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / getfuncname

Function getfuncname

3rd/lua-5.4.3/src/ldebug.c:312–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311
312static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
313 if (ci == NULL) /* no 'ci'? */
314 return NULL; /* no info */
315 else if (ci->callstatus & CIST_FIN) { /* is this a finalizer? */
316 *name = "__gc";
317 return "metamethod"; /* report it as such */
318 }
319 /* calling function is a known Lua function? */
320 else if (!(ci->callstatus & CIST_TAIL) && isLua(ci->previous))
321 return funcnamefromcode(L, ci->previous, name);
322 else return NULL; /* no way to find a name */
323}
324
325
326static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,

Callers 1

auxgetinfoFunction · 0.85

Calls 1

funcnamefromcodeFunction · 0.85

Tested by

no test coverage detected