it doesn't pay to optimize absence when it is an error

This commit is contained in:
Roberto Ierusalimschy
2001-12-10 20:10:30 -02:00
parent 9cd36059ad
commit a4c35a3269
3 changed files with 33 additions and 19 deletions

2
ldo.c
View File

@@ -143,7 +143,7 @@ void luaD_call (lua_State *L, StkId func) {
if (ttype(func) != LUA_TFUNCTION) {
/* `func' is not a function; check the `function' tag method */
const TObject *tm = luaT_gettmbyobj(L, func, TM_CALL);
if (tm == NULL || ttype(tm) != LUA_TFUNCTION)
if (ttype(tm) != LUA_TFUNCTION)
luaG_typeerror(L, func, "call");
luaD_openstack(L, func);
setobj(func, tm); /* tag method is the new function to be called */