summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 02:14:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 02:14:40 +0000
commitd4cbf950029c99d37ad2f4369d1782f3a9a3dc98 (patch)
tree31f745acb00379cf9de0e6656a9b12da7cf7ef4f /st.c
parentb39e00d39d426ef8a08af0a3627ea7f5bf4cd973 (diff)
downloadruby-d4cbf950029c99d37ad2f4369d1782f3a9a3dc98.tar.gz
* st.c (st_numcmp, st_numhash): use st_data_t instead of long, because
the former may be larger than the latter. * include/ruby/st.h (CHAR_BIT): get rid of magic number. * include/ruby/st.h (struct st_table): num_entries never exceed num_bins. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13326 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 9cf6ba204f..4c5d87a173 100644
--- a/st.c
+++ b/st.c
@@ -815,13 +815,13 @@ strhash(register const char *string)
}
int
-st_numcmp(long x, long y)
+st_numcmp(st_data_t x, st_data_t y)
{
return x != y;
}
int
-st_numhash(long n)
+st_numhash(st_data_t n)
{
- return n;
+ return (int)n;
}