зеркало из https://github.com/github/ruby.git
* st.c (st_delete): use real_entries in st_delete for packed tables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d481e34e3c
Коммит
44e6f5a1bb
|
@ -1,3 +1,7 @@
|
|||
Sat Mar 31 10:01:39 2012 Sokolov Yura <funny-falcon <funny.falcon@gmail.com>>
|
||||
|
||||
* st.c (st_delete): use real_entries in st_delete for packed tables
|
||||
|
||||
Sat Mar 31 07:53:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* st.c (st_foreach_check): remove the entry by replacing with never
|
||||
|
|
2
st.c
2
st.c
|
@ -731,7 +731,7 @@ st_delete(register st_table *table, register st_data_t *key, st_data_t *value)
|
|||
|
||||
if (table->entries_packed) {
|
||||
st_index_t i = find_packed_index(table, hash_val, *key);
|
||||
if (i < table->num_entries) {
|
||||
if (i < table->real_entries) {
|
||||
if (value != 0) *value = PVAL(table, i);
|
||||
*key = PKEY(table, i);
|
||||
remove_packed_entry(table, i);
|
||||
|
|
Загрузка…
Ссылка в новой задаче