diff options
| -rw-r--r-- | lapi.c | 8 | ||||
| -rw-r--r-- | lua.h | 3 |
2 files changed, 9 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.172 2013/04/12 19:07:09 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.173 2013/04/15 15:43:34 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -264,6 +264,12 @@ LUA_API int lua_iscfunction (lua_State *L, int idx) { | |||
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | 266 | ||
| 267 | LUA_API int lua_isinteger (lua_State *L, int idx) { | ||
| 268 | StkId o = index2addr(L, idx); | ||
| 269 | return ttisinteger(o); | ||
| 270 | } | ||
| 271 | |||
| 272 | |||
| 267 | LUA_API int lua_isnumber (lua_State *L, int idx) { | 273 | LUA_API int lua_isnumber (lua_State *L, int idx) { |
| 268 | TValue n; | 274 | TValue n; |
| 269 | const TValue *o = index2addr(L, idx); | 275 | const TValue *o = index2addr(L, idx); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.284 2013/02/19 18:39:04 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.285 2013/03/15 13:04:22 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 |
| @@ -161,6 +161,7 @@ LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); | |||
| 161 | LUA_API int (lua_isnumber) (lua_State *L, int idx); | 161 | LUA_API int (lua_isnumber) (lua_State *L, int idx); |
| 162 | LUA_API int (lua_isstring) (lua_State *L, int idx); | 162 | LUA_API int (lua_isstring) (lua_State *L, int idx); |
| 163 | LUA_API int (lua_iscfunction) (lua_State *L, int idx); | 163 | LUA_API int (lua_iscfunction) (lua_State *L, int idx); |
| 164 | LUA_API int (lua_isinteger) (lua_State *L, int idx); | ||
| 164 | LUA_API int (lua_isuserdata) (lua_State *L, int idx); | 165 | LUA_API int (lua_isuserdata) (lua_State *L, int idx); |
| 165 | LUA_API int (lua_type) (lua_State *L, int idx); | 166 | LUA_API int (lua_type) (lua_State *L, int idx); |
| 166 | LUA_API const char *(lua_typename) (lua_State *L, int tp); | 167 | LUA_API const char *(lua_typename) (lua_State *L, int tp); |
