diff options
Diffstat (limited to '')
-rw-r--r-- | lapi.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.210 2002/08/07 14:24:24 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.211 2002/08/08 20:08:41 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 | */ |
@@ -211,6 +211,12 @@ LUA_API int lua_isstring (lua_State *L, int index) { | |||
211 | } | 211 | } |
212 | 212 | ||
213 | 213 | ||
214 | LUA_API int lua_isuserdata (lua_State *L, int index) { | ||
215 | const TObject *o = luaA_indexAcceptable(L, index); | ||
216 | return (o != NULL && (ttisuserdata(o) || ttislightuserdata(o))); | ||
217 | } | ||
218 | |||
219 | |||
214 | LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { | 220 | LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { |
215 | StkId o1 = luaA_indexAcceptable(L, index1); | 221 | StkId o1 = luaA_indexAcceptable(L, index1); |
216 | StkId o2 = luaA_indexAcceptable(L, index2); | 222 | StkId o2 = luaA_indexAcceptable(L, index2); |