mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
d481e34e3c
commit
44e6f5a1bb
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue