diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-25 13:55:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-04-25 13:55:09 -0300 |
commit | 534c3a64d3b47585b415f229aa03af35f9a4796e (patch) | |
tree | bda9de835dbeff8b73ed5f0977e81dc9573ad046 /lobject.c | |
parent | b9c98cd4d97774d703a48fefd56c66f552e0cd83 (diff) | |
download | lua-534c3a64d3b47585b415f229aa03af35f9a4796e.tar.gz lua-534c3a64d3b47585b415f229aa03af35f9a4796e.tar.bz2 lua-534c3a64d3b47585b415f229aa03af35f9a4796e.zip |
small optimizations for table access
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 1.35 2000/03/29 20:19:20 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.36 2000/03/31 16:28:45 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -32,7 +32,8 @@ unsigned long luaO_power2 (unsigned long n) { | |||
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
35 | int luaO_equalval (const TObject *t1, const TObject *t2) { | 35 | int luaO_equalObj (const TObject *t1, const TObject *t2) { |
36 | if (ttype(t1) != ttype(t2)) return 0; | ||
36 | switch (ttype(t1)) { | 37 | switch (ttype(t1)) { |
37 | case TAG_NUMBER: | 38 | case TAG_NUMBER: |
38 | return nvalue(t1) == nvalue(t2); | 39 | return nvalue(t1) == nvalue(t2); |