diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-04-05 13:26:37 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-04-05 13:26:37 -0300 |
commit | d394d5536aeccb937fb6fd8e7476b08d672bc892 (patch) | |
tree | 82483d3792049e16b5dc8e2573d661ca2acd9573 /lvm.c | |
parent | a2f98314a30859b217d6f7f7741c785a8e029e3c (diff) | |
download | lua-d394d5536aeccb937fb6fd8e7476b08d672bc892.tar.gz lua-d394d5536aeccb937fb6fd8e7476b08d672bc892.tar.bz2 lua-d394d5536aeccb937fb6fd8e7476b08d672bc892.zip |
new macro 'eqstr'
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.108 2010/03/29 20:45:49 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.109 2010/04/02 15:39:07 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 | */ |
@@ -254,6 +254,7 @@ int luaV_equalval_ (lua_State *L, const TValue *t1, const TValue *t2) { | |||
254 | case LUA_TNUMBER: return luai_numeq(nvalue(t1), nvalue(t2)); | 254 | case LUA_TNUMBER: return luai_numeq(nvalue(t1), nvalue(t2)); |
255 | case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */ | 255 | case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */ |
256 | case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2); | 256 | case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2); |
257 | case LUA_TSTRING: return eqstr(rawtsvalue(t1), rawtsvalue(t2)); | ||
257 | case LUA_TUSERDATA: { | 258 | case LUA_TUSERDATA: { |
258 | if (uvalue(t1) == uvalue(t2)) return 1; | 259 | if (uvalue(t1) == uvalue(t2)) return 1; |
259 | tm = get_compTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ); | 260 | tm = get_compTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ); |