new structure for collectable objects, sharing a common header

This commit is contained in:
Roberto Ierusalimschy
2002-08-30 16:09:21 -03:00
parent beeff4ccaf
commit fdafd4f4a8
14 changed files with 276 additions and 302 deletions

8
lapi.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 1.210 2002/08/07 14:24:24 roberto Exp roberto $
** $Id: lapi.c,v 1.211 2002/08/08 20:08:41 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -211,6 +211,12 @@ LUA_API int lua_isstring (lua_State *L, int index) {
}
LUA_API int lua_isuserdata (lua_State *L, int index) {
const TObject *o = luaA_indexAcceptable(L, index);
return (o != NULL && (ttisuserdata(o) || ttislightuserdata(o)));
}
LUA_API int lua_rawequal (lua_State *L, int index1, int index2) {
StkId o1 = luaA_indexAcceptable(L, index1);
StkId o2 = luaA_indexAcceptable(L, index2);