no more `lua_istrue' function

This commit is contained in:
Roberto Ierusalimschy
2002-02-08 20:39:36 -02:00
parent cb50fcf42d
commit 87b0e3d477
4 changed files with 10 additions and 16 deletions

7
lua.h
View File

@@ -117,7 +117,6 @@ LUA_API int lua_stackspace (lua_State *L);
*/
LUA_API int lua_isnumber (lua_State *L, int index);
LUA_API int lua_istrue (lua_State *L, int index);
LUA_API int lua_isstring (lua_State *L, int index);
LUA_API int lua_iscfunction (lua_State *L, int index);
LUA_API int lua_type (lua_State *L, int index);
@@ -217,7 +216,11 @@ LUA_API void lua_newuserdatabox (lua_State *L, void *u);
#define lua_pop(L,n) lua_settop(L, -(n)-1)
#define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))
#define lua_register(L,n,f) \
(lua_pushstring(L, n), \
lua_pushcfunction(L, f), \
lua_settable(L, LUA_GLOBALSINDEX))
#define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0)
#define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION)