summaryrefslogtreecommitdiff
path: root/lvm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-13 10:39:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-13 10:39:55 -0300
commit864c96f36ce8410b03652b1cb9800e4b3c76bcf7 (patch)
treed5061c0babf25cf222953e5195673534f8287f34 /lvm.h
parent0052930ffe8c86f0df7ab99dd1b6668f9e10c781 (diff)
downloadlua-github-864c96f36ce8410b03652b1cb9800e4b3c76bcf7.tar.gz
new fallback for equality `__eq'
Diffstat (limited to 'lvm.h')
-rw-r--r--lvm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lvm.h b/lvm.h
index 0078a617..bd1d54d7 100644
--- a/lvm.h
+++ b/lvm.h
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.h,v 1.40 2002/06/03 14:08:43 roberto Exp roberto $
+** $Id: lvm.h,v 1.41 2002/06/12 14:51:31 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -18,8 +18,12 @@
#define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \
(((o) = luaV_tonumber(o,n)) != NULL))
+#define equalobj(L,o1,o2) \
+ (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))
+
int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r);
+int luaV_equalval (lua_State *L, const TObject *t1, const TObject *t2);
const TObject *luaV_tonumber (const TObject *obj, TObject *n);
int luaV_tostring (lua_State *L, TObject *obj);
void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res);