diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-05 03:44:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-05 03:44:05 +0000 |
commit | 4a8c531a26f2e6b33b6910731869488f93c77775 (patch) | |
tree | d36c52a255a2810ef4f0ad9b8cf3c46f72c9931e /include/ruby | |
parent | 5bd91964b2ca867579a9e243e8545872700e200c (diff) | |
download | ruby-4a8c531a26f2e6b33b6910731869488f93c77775.tar.gz |
* 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/ruby')
-rw-r--r-- | include/ruby/st.h | 9 |
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) |