diff options
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.269 2010/05/10 13:50:20 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.270 2010/05/12 14:09:20 roberto Exp roberto $ |
3 | ** Lua - A Scripting Language | 3 | ** Lua - A Scripting Language |
4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
@@ -153,8 +153,8 @@ LUA_API int (lua_isuserdata) (lua_State *L, int idx); | |||
153 | LUA_API int (lua_type) (lua_State *L, int idx); | 153 | LUA_API int (lua_type) (lua_State *L, int idx); |
154 | LUA_API const char *(lua_typename) (lua_State *L, int tp); | 154 | LUA_API const char *(lua_typename) (lua_State *L, int tp); |
155 | 155 | ||
156 | LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx); | 156 | LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); |
157 | LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx); | 157 | LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); |
158 | LUA_API int (lua_toboolean) (lua_State *L, int idx); | 158 | LUA_API int (lua_toboolean) (lua_State *L, int idx); |
159 | LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); | 159 | LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); |
160 | LUA_API size_t (lua_rawlen) (lua_State *L, int idx); | 160 | LUA_API size_t (lua_rawlen) (lua_State *L, int idx); |
@@ -296,6 +296,9 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | |||
296 | ** =============================================================== | 296 | ** =============================================================== |
297 | */ | 297 | */ |
298 | 298 | ||
299 | #define lua_tonumber(L,i) lua_tonumberx(L,i,NULL) | ||
300 | #define lua_tointeger(L,i) lua_tointegerx(L,i,NULL) | ||
301 | |||
299 | #define lua_pop(L,n) lua_settop(L, -(n)-1) | 302 | #define lua_pop(L,n) lua_settop(L, -(n)-1) |
300 | 303 | ||
301 | #define lua_newtable(L) lua_createtable(L, 0, 0) | 304 | #define lua_newtable(L) lua_createtable(L, 0, 0) |