MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / luaG_callerror

Function luaG_callerror

xrepo/packages/l/lua/port/lua/src/ldebug.c:743–749  ·  view source on GitHub ↗

** Raise an error for calling a non-callable object. Try to find a name ** for the object based on how it was called ('funcnamefromcall'); if it ** cannot get a name there, try 'varinfo'. */

Source from the content-addressed store, hash-verified

741** cannot get a name there, try 'varinfo'.
742*/
743l_noret luaG_callerror (lua_State *L, const TValue *o) {
744 CallInfo *ci = L->ci;
745 const char *name = NULL; /* to avoid warnings */
746 const char *kind = funcnamefromcall(L, ci, &name);
747 const char *extra = kind ? formatvarinfo(L, kind, name) : varinfo(L, o);
748 typeerror(L, o, "call", extra);
749}
750
751
752l_noret luaG_forerror (lua_State *L, const TValue *o, const char *what) {

Callers 1

luaD_tryfuncTMFunction · 0.85

Calls 4

funcnamefromcallFunction · 0.85
formatvarinfoFunction · 0.85
varinfoFunction · 0.85
typeerrorFunction · 0.85

Tested by

no test coverage detected