diff options
| author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-08 14:34:13 +0000 |
|---|---|---|
| committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-08 14:34:13 +0000 |
| commit | 5619c391e1aedc99e56ec509158e2e8022b67c67 (patch) | |
| tree | 2c4441983f254b86451e9abb73690c741832b880 /include/ruby | |
| parent | cc1fc79dfa02f265dd684fc224c664112a1fbc6e (diff) | |
| download | ruby-5619c391e1aedc99e56ec509158e2e8022b67c67.tar.gz ruby-5619c391e1aedc99e56ec509158e2e8022b67c67.tar.xz ruby-5619c391e1aedc99e56ec509158e2e8022b67c67.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@22132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
| -rw-r--r-- | include/ruby/st.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/st.h b/include/ruby/st.h index 09a7c5822..73216ba45 100644 --- a/include/ruby/st.h +++ b/include/ruby/st.h @@ -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) |
