mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/st.h, st.c: order entries by a linked list instead of
a loop to fix iteration miss when hash is modified during iteration. [ruby-dev:37910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8f9d6d1863
commit
f64018b111
3 changed files with 28 additions and 21 deletions
|
@ -75,7 +75,7 @@ struct st_table {
|
|||
#endif
|
||||
st_index_t num_entries : ST_INDEX_BITS - 1;
|
||||
struct st_table_entry **bins;
|
||||
struct st_table_entry *head;
|
||||
struct st_table_entry *head, *tail;
|
||||
};
|
||||
|
||||
#define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue