diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 16:09:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-30 16:09:21 -0300 |
commit | fdafd4f4a88d1584dea900517445a17d87f8b82f (patch) | |
tree | 52e38e886d569e77c1df82ebe2bcfbaafd4c6f75 /lapi.c | |
parent | beeff4ccafe5877d00119cb3d93f1f937d46dcfb (diff) | |
download | lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.tar.gz lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.tar.bz2 lua-fdafd4f4a88d1584dea900517445a17d87f8b82f.zip |
new structure for collectable objects, sharing a common header
Diffstat (limited to 'lapi.c')
-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); |