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