MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / getfuncname

Function getfuncname

third-party/lua-5.3.5/src/ldebug.c:248–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247
248static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
249 if (ci == NULL) /* no 'ci'? */
250 return NULL; /* no info */
251 else if (ci->callstatus & CIST_FIN) { /* is this a finalizer? */
252 *name = "__gc";
253 return "metamethod"; /* report it as such */
254 }
255 /* calling function is a known Lua function? */
256 else if (!(ci->callstatus & CIST_TAIL) && isLua(ci->previous))
257 return funcnamefromcode(L, ci->previous, name);
258 else return NULL; /* no way to find a name */
259}
260
261
262static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,

Callers 1

auxgetinfoFunction · 0.70

Calls 1

funcnamefromcodeFunction · 0.70

Tested by

no test coverage detected