summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 03:44:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-05 03:44:05 +0000
commit4a8c531a26f2e6b33b6910731869488f93c77775 (patch)
treed36c52a255a2810ef4f0ad9b8cf3c46f72c9931e /include
parent5bd91964b2ca867579a9e243e8545872700e200c (diff)
* st.c (unpack_entries): use union instead of casted pointer.
patched by Sokolov Yura <funny.falcon AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/st.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 695fbf9cb9..dbb0de45a8 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -91,8 +91,13 @@ struct st_table {
__extension__
#endif
st_index_t num_entries : ST_INDEX_BITS - 1;
- struct st_table_entry **bins;
- struct st_table_entry *head, *tail;
+ union {
+ struct {
+ struct st_table_entry **bins;
+ struct st_table_entry *head, *tail;
+ } big;
+ struct st_packed_bins *packed;
+ } as;
};
#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)