diff options
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) |