diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 02:14:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 02:14:40 +0000 |
commit | d4cbf950029c99d37ad2f4369d1782f3a9a3dc98 (patch) | |
tree | 31f745acb00379cf9de0e6656a9b12da7cf7ef4f /st.c | |
parent | b39e00d39d426ef8a08af0a3627ea7f5bf4cd973 (diff) | |
download | ruby-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |