** 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'. */
| 761 | ** cannot get a name there, try 'varinfo'. |
| 762 | */ |
| 763 | l_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 | |
| 772 | l_noret luaG_forerror (lua_State *L, const TValue *o, const char *what) { |
no test coverage detected