aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-02-08 20:39:36 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-02-08 20:39:36 -0200
commit87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1 (patch)
treef887a310dfb777403129a9520af3560fe3b85804 /lua.h
parentcb50fcf42d9ab2d04f6f28a30a0ca5cc6e58054c (diff)
downloadlua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.gz
lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.tar.bz2
lua-87b0e3d477a8d4af32a2a200a2d8cb2c3aaa05a1.zip
no more `lua_istrue' function
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index ac0a2f96..a3fb1df5 100644
--- a/lua.h
+++ b/lua.h
@@ -117,7 +117,6 @@ LUA_API int lua_stackspace (lua_State *L);
117*/ 117*/
118 118
119LUA_API int lua_isnumber (lua_State *L, int index); 119LUA_API int lua_isnumber (lua_State *L, int index);
120LUA_API int lua_istrue (lua_State *L, int index);
121LUA_API int lua_isstring (lua_State *L, int index); 120LUA_API int lua_isstring (lua_State *L, int index);
122LUA_API int lua_iscfunction (lua_State *L, int index); 121LUA_API int lua_iscfunction (lua_State *L, int index);
123LUA_API int lua_type (lua_State *L, int index); 122LUA_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)