diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-11 08:09:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-11 08:09:19 +0000 |
commit | ad0b87727df89ea54edb2d6a6b295147fbca55f8 (patch) | |
tree | 0377ff70716b13f971f94019c8078b2d5c86522b /st.c | |
parent | f2ad09d5b7cdea64963433af13a9525bebc19a78 (diff) | |
download | ruby-ad0b87727df89ea54edb2d6a6b295147fbca55f8.tar.gz |
* hash.c (rb_hash_identical): a new method to make a hash to
compare keys by their identity.
* hash.c (rb_hash_identical_p): new method to tell if a hash is
identical or not.
* st.c (st_numcmp, st_numhash): export hash type functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -38,11 +38,9 @@ struct st_table_entry { * */ -static int numcmp(long, long); -static int numhash(long); static struct st_hash_type type_numhash = { - numcmp, - numhash, + st_numcmp, + st_numhash, }; /* extern int strcmp(const char *, const char *); */ @@ -589,14 +587,14 @@ strhash(register const char *string) return hval; } -static int -numcmp(long x, long y) +int +st_numcmp(long x, long y) { return x != y; } -static int -numhash(long n) +int +st_numhash(long n) { return n; } |