summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-11 08:09:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-11 08:09:19 +0000
commitad0b87727df89ea54edb2d6a6b295147fbca55f8 (patch)
tree0377ff70716b13f971f94019c8078b2d5c86522b /st.c
parentf2ad09d5b7cdea64963433af13a9525bebc19a78 (diff)
* 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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/st.c b/st.c
index 0ace74e235..88d79f8d70 100644
--- a/st.c
+++ b/st.c
@@ -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;
}