diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-31 15:24:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-05-31 15:24:36 -0300 |
commit | 9b7dddad7d3f4546f838834d9674eaf0f2fca3dd (patch) | |
tree | cf0f283b5177d481023d0724d1c08a95d7482005 /lvm.h | |
parent | 3f04a9f2c07bc06dddbc473178b314f1fd686701 (diff) | |
download | lua-9b7dddad7d3f4546f838834d9674eaf0f2fca3dd.tar.gz lua-9b7dddad7d3f4546f838834d9674eaf0f2fca3dd.tar.bz2 lua-9b7dddad7d3f4546f838834d9674eaf0f2fca3dd.zip |
no need for two different implementations for equality (one raw and
one with metamethods)
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 2.14 2009/12/17 16:20:01 roberto Exp roberto $ | 2 | ** $Id: lvm.h,v 2.15 2011/04/05 18:32:06 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 | */ |
@@ -19,10 +19,14 @@ | |||
19 | 19 | ||
20 | #define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalval_(L, o1, o2)) | 20 | #define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalval_(L, o1, o2)) |
21 | 21 | ||
22 | #define luaV_rawequalObj(t1,t2) \ | ||
23 | (ttisequal(t1,t2) && luaV_equalval_(NULL,t1,t2)) | ||
24 | |||
22 | 25 | ||
23 | /* not to called directly */ | 26 | /* not to called directly */ |
24 | LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2); | 27 | LUAI_FUNC int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2); |
25 | 28 | ||
29 | |||
26 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); | 30 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); |
27 | LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); | 31 | LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); |
28 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); | 32 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); |