MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaG_callerror

Function luaG_callerror

lib/lua/src/ldebug.c:763–769  ·  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

761** cannot get a name there, try 'varinfo'.
762*/
763l_noret luaG_callerror (lua_State *L, const TValue *o) {
764 CallInfo *ci = L->ci;
765 const char *name = NULL; /* to avoid warnings */
766 const char *kind = funcnamefromcall(L, ci, &name);
767 const char *extra = kind ? formatvarinfo(L, kind, name) : varinfo(L, o);
768 typeerror(L, o, "call", extra);
769}
770
771
772l_noret luaG_forerror (lua_State *L, const TValue *o, const char *what) {

Callers 1

tryfuncTMFunction · 0.85

Calls 4

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

Tested by

no test coverage detected