summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-12 07:42:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-12 07:42:35 +0000
commit3a7020854d43c4d29ca5cd9013e3af139f378548 (patch)
tree2a73f7f17fa97d74f5580248e39f39765747d573 /st.c
parent2322a131272f705139fb1e6bbcf1d85a0205e8b0 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/st.c b/st.c
index f14c69f..e40c6e1 100644
--- a/st.c
+++ b/st.c
@@ -62,10 +62,10 @@ static void rehash();
#define alloc(type) (type*)xmalloc((unsigned)sizeof(type))
#define Calloc(n,s) (char*)xcalloc((n),(s))
-#define EQUAL(table, x, y) ((*table->type->compare)(x, y) == 0)
+#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
-#define do_hash(key, table) (unsigned int)(*(table)->type->hash)((key))
-#define do_hash_bin(key, table) (do_hash(key, table)&(table)->num_bins)
+#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
+#define do_hash_bin(key,table) (do_hash(key, table)&(table)->num_bins)
/*
* MINSIZE is the minimum size of a dictionary.