@@ -685,9 +685,8 @@ ar_find_entry(VALUE hash, st_hash_t hash_value, st_data_t key)
685
685
return ar_find_entry_hint (hash , hint , key );
686
686
}
687
687
688
- //old one
689
688
static inline void
690
- ar_free_and_clear_table (VALUE hash )
689
+ hash_ar_free_and_clear_table (VALUE hash )
691
690
{
692
691
RHASH_AR_TABLE_CLEAR (hash );
693
692
@@ -715,7 +714,7 @@ ar_try_convert_table(VALUE hash)
715
714
st_add_direct (new_tab , pair -> key , pair -> val );
716
715
}
717
716
718
- ar_free_and_clear_table (hash );
717
+ hash_ar_free_and_clear_table (hash );
719
718
RHASH_ST_TABLE_SET (hash , new_tab );
720
719
}
721
720
@@ -742,7 +741,7 @@ ar_force_convert_table(VALUE hash, const char *file, int line)
742
741
ar_table_pair * pair = RHASH_AR_TABLE_REF (hash , i );
743
742
st_add_direct (new_tab , pair -> key , pair -> val );
744
743
}
745
- ar_free_and_clear_table (hash );
744
+ hash_ar_free_and_clear_table (hash );
746
745
}
747
746
748
747
RHASH_ST_TABLE_SET (hash , new_tab );
@@ -1161,7 +1160,7 @@ ar_clear(VALUE hash)
1161
1160
}
1162
1161
1163
1162
static void
1164
- st_free_and_clear_table (VALUE hash )
1163
+ hash_st_free_and_clear_table (VALUE hash )
1165
1164
{
1166
1165
HASH_ASSERT (RHASH_ST_TABLE_P (hash ));
1167
1166
@@ -1962,7 +1961,8 @@ rb_hash_rehash(VALUE hash)
1962
1961
if (RHASH_AR_TABLE_P (hash )) {
1963
1962
tmp = hash_alloc (0 );
1964
1963
rb_hash_foreach (hash , rb_hash_rehash_i , (VALUE )tmp );
1965
- ar_free_and_clear_table (hash );
1964
+
1965
+ hash_ar_free_and_clear_table (hash );
1966
1966
ar_copy (hash , tmp );
1967
1967
}
1968
1968
else if (RHASH_ST_TABLE_P (hash )) {
@@ -1974,6 +1974,7 @@ rb_hash_rehash(VALUE hash)
1974
1974
1975
1975
rb_hash_foreach (hash , rb_hash_rehash_i , (VALUE )tmp );
1976
1976
1977
+ hash_st_free_and_clear_table (hash );
1977
1978
RHASH_ST_TABLE_SET (hash , tbl );
1978
1979
RHASH_ST_CLEAR (tmp );
1979
1980
}
@@ -2906,10 +2907,10 @@ rb_hash_replace(VALUE hash, VALUE hash2)
2906
2907
COPY_DEFAULT (hash , hash2 );
2907
2908
2908
2909
if (RHASH_AR_TABLE_P (hash )) {
2909
- ar_free_and_clear_table (hash );
2910
+ hash_ar_free_and_clear_table (hash );
2910
2911
}
2911
2912
else {
2912
- st_free_and_clear_table (hash );
2913
+ hash_st_free_and_clear_table (hash );
2913
2914
}
2914
2915
2915
2916
hash_copy (hash , hash2 );
0 commit comments