diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:39:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-02-08 20:39:36 -0200 |
commit | 87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1 (patch) | |
tree | f887a310dfb777403129a9520af3560fe3b85804 /lua.h | |
parent | cb50fcf42d9ab2d04f6f28a30a0ca5cc6e58054c (diff) | |
download | lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.gz lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.bz2 lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.zip |
no more `lua_istrue' function
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -117,7 +117,6 @@ LUA_API int lua_stackspace (lua_State *L); | |||
117 | */ | 117 | */ |
118 | 118 | ||
119 | LUA_API int lua_isnumber (lua_State *L, int index); | 119 | LUA_API int lua_isnumber (lua_State *L, int index); |
120 | LUA_API int lua_istrue (lua_State *L, int index); | ||
121 | LUA_API int lua_isstring (lua_State *L, int index); | 120 | LUA_API int lua_isstring (lua_State *L, int index); |
122 | LUA_API int lua_iscfunction (lua_State *L, int index); | 121 | LUA_API int lua_iscfunction (lua_State *L, int index); |
123 | LUA_API int lua_type (lua_State *L, int index); | 122 | LUA_API int lua_type (lua_State *L, int index); |
@@ -217,7 +216,11 @@ LUA_API void lua_newuserdatabox (lua_State *L, void *u); | |||
217 | 216 | ||
218 | #define lua_pop(L,n) lua_settop(L, -(n)-1) | 217 | #define lua_pop(L,n) lua_settop(L, -(n)-1) |
219 | 218 | ||
220 | #define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n)) | 219 | #define lua_register(L,n,f) \ |
220 | (lua_pushstring(L, n), \ | ||
221 | lua_pushcfunction(L, f), \ | ||
222 | lua_settable(L, LUA_GLOBALSINDEX)) | ||
223 | |||
221 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) | 224 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) |
222 | 225 | ||
223 | #define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) | 226 | #define lua_isfunction(L,n) (lua_type(L,n) == LUA_TFUNCTION) |