diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-13 10:39:55 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-13 10:39:55 -0300 |
commit | 864c96f36ce8410b03652b1cb9800e4b3c76bcf7 (patch) | |
tree | d5061c0babf25cf222953e5195673534f8287f34 /lvm.h | |
parent | 0052930ffe8c86f0df7ab99dd1b6668f9e10c781 (diff) | |
download | lua-864c96f36ce8410b03652b1cb9800e4b3c76bcf7.tar.gz lua-864c96f36ce8410b03652b1cb9800e4b3c76bcf7.tar.bz2 lua-864c96f36ce8410b03652b1cb9800e4b3c76bcf7.zip |
new fallback for equality `__eq'
Diffstat (limited to 'lvm.h')
-rw-r--r-- | lvm.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.h,v 1.40 2002/06/03 14:08:43 roberto Exp roberto $ | 2 | ** $Id: lvm.h,v 1.41 2002/06/12 14:51:31 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -18,8 +18,12 @@ | |||
18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ |
19 | (((o) = luaV_tonumber(o,n)) != NULL)) | 19 | (((o) = luaV_tonumber(o,n)) != NULL)) |
20 | 20 | ||
21 | #define equalobj(L,o1,o2) \ | ||
22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) | ||
23 | |||
21 | 24 | ||
22 | int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r); | 25 | int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r); |
26 | int luaV_equalval (lua_State *L, const TObject *t1, const TObject *t2); | ||
23 | const TObject *luaV_tonumber (const TObject *obj, TObject *n); | 27 | const TObject *luaV_tonumber (const TObject *obj, TObject *n); |
24 | int luaV_tostring (lua_State *L, TObject *obj); | 28 | int luaV_tostring (lua_State *L, TObject *obj); |
25 | void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res); | 29 | void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res); |