diff options
author | Koichi Sasada <ko1@atdot.net> | 2019-07-31 21:50:58 +0100 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2019-07-31 21:50:58 +0100 |
commit | bd1052d55da94b5503ff00c10e1cdcc04a6f9608 (patch) | |
tree | 208c786e158dd6fb262bd1a0e469b89a55ba4b31 /hash.c | |
parent | deddc8047647792e27e1b9829bc917ef73504320 (diff) | |
download | bundler-bd1052d55da94b5503ff00c10e1cdcc04a6f9608.tar.gz |
use hash_ar_table_set() directly
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -560,8 +560,6 @@ hash_ar_table_set(VALUE hash, ar_table *ar) hash_verify(hash); } -#define RHASH_AR_TABLE_SET(h, a) hash_ar_table_set(h, a) - #define RHASH_SET_ST_FLAG(h) FL_SET_RAW(h, RHASH_ST_TABLE_FLAG) #define RHASH_UNSET_ST_FLAG(h) FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG) @@ -607,7 +605,7 @@ RHASH_AR_TABLE_SIZE_DEC(VALUE h) #define RHASH_AR_TABLE_CLEAR(h) do { \ RBASIC(h)->flags &= ~RHASH_AR_TABLE_SIZE_MASK; \ RBASIC(h)->flags &= ~RHASH_AR_TABLE_BOUND_MASK; \ - RHASH_AR_TABLE_SET(hash, NULL); \ + hash_ar_table_set(hash, NULL); \ } while (0) @@ -626,7 +624,7 @@ ar_alloc_table(VALUE hash) RHASH_AR_TABLE_SIZE_SET(hash, 0); RHASH_AR_TABLE_BOUND_SET(hash, 0); - RHASH_AR_TABLE_SET(hash, tab); + hash_ar_table_set(hash, tab); return tab; } @@ -1148,7 +1146,7 @@ ar_copy(VALUE hash1, VALUE hash2) RHASH(hash1)->ar_hint.word = RHASH(hash2)->ar_hint.word; RHASH_AR_TABLE_BOUND_SET(hash1, RHASH_AR_TABLE_BOUND(hash2)); RHASH_AR_TABLE_SIZE_SET(hash1, RHASH_AR_TABLE_SIZE(hash2)); - RHASH_AR_TABLE_SET(hash1, new_tab); + hash_ar_table_set(hash1, new_tab); rb_gc_writebarrier_remember(hash1); return new_tab; @@ -1164,7 +1162,7 @@ ar_copy(VALUE hash1, VALUE hash2) ruby_xfree(RHASH_AR_TABLE(hash1)); } - RHASH_AR_TABLE_SET(hash1, NULL); + hash_ar_table_set(hash1, NULL); rb_gc_writebarrier_remember(hash1); return old_tab; @@ -1207,7 +1205,7 @@ rb_hash_transient_heap_evacuate(VALUE hash, int promote) if (new_tab == NULL) goto promote; } *new_tab = *old_tab; - RHASH_AR_TABLE_SET(hash, new_tab); + hash_ar_table_set(hash, new_tab); } hash_verify(hash); } |