aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/st.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 05:24:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 05:24:25 +0000
commitec2beed3b2f4670c31d931613d4c9b297343feda (patch)
tree9259f91dc2195c564cb3013822298a794ba796e1 /include/ruby/st.h
parentd4cbf950029c99d37ad2f4369d1782f3a9a3dc98 (diff)
downloadruby-ec2beed3b2f4670c31d931613d4c9b297343feda.tar.gz
* include/ruby/st.h (rb_index_t): use st_data_t for the platforms it
is larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/st.h')
-rw-r--r--include/ruby/st.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 7702c7a8e9..3b64bd72fb 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -49,15 +49,14 @@ struct st_hash_type {
int (*hash)(ANYARGS /*st_data_t*/); /* st_hash_func* */
};
-typedef unsigned int st_index_t;
-#define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT - 1)
+typedef st_data_t st_index_t;
+#define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT)
struct st_table {
const struct st_hash_type *type;
unsigned int entries_packed : 1;
- st_index_t num_bins : ST_INDEX_BITS;
- unsigned int st_dummy_bit : 1;
- st_index_t num_entries : ST_INDEX_BITS;
+ st_index_t num_bins : ST_INDEX_BITS - 1;
+ st_index_t num_entries;
struct st_table_entry **bins;
struct st_table_entry *head;
};