MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getfuncname

Function getfuncname

extlibs/lua/src/ldebug.c:318–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317
318static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
319 if (ci == NULL) /* no 'ci'? */
320 return NULL; /* no info */
321 else if (ci->callstatus & CIST_FIN) { /* is this a finalizer? */
322 *name = "__gc";
323 return "metamethod"; /* report it as such */
324 }
325 /* calling function is a known Lua function? */
326 else if (!(ci->callstatus & CIST_TAIL) && isLua(ci->previous))
327 return funcnamefromcode(L, ci->previous, name);
328 else return NULL; /* no way to find a name */
329}
330
331
332static 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