From f64018b111a371d6ece84d509535b760d072053f Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 8 Feb 2009 14:34:13 +0000 Subject: * 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 --- include/ruby/st.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby/st.h') diff --git a/include/ruby/st.h b/include/ruby/st.h index 09a7c58226..73216ba45c 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) -- cgit v1.2.3