diff options
author | Peter Zhu <[email protected]> | 2023-07-13 09:42:24 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-07-13 14:48:14 -0400 |
commit | de327ccb63db9f929949a499476647f8def84be2 (patch) | |
tree | 57876af86d0c506b1f09d1ab46a0e03f88f727b0 /hash.c | |
parent | 5ebc13311607a7af5423337d64b406c62b221bf9 (diff) |
Remove RARRAY_PTR_USE_TRANSIENT
RARRAY_PTR_USE now does the same things as RARRAY_PTR_USE_TRANSIENT.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8071
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3501,7 +3501,7 @@ rb_hash_keys(VALUE hash) if (size == 0) return keys; if (ST_DATA_COMPATIBLE_P(VALUE)) { - RARRAY_PTR_USE_TRANSIENT(keys, ptr, { + RARRAY_PTR_USE(keys, ptr, { if (RHASH_AR_TABLE_P(hash)) { size = ar_keys(hash, ptr, size); } @@ -3548,14 +3548,14 @@ rb_hash_values(VALUE hash) if (ST_DATA_COMPATIBLE_P(VALUE)) { if (RHASH_AR_TABLE_P(hash)) { rb_gc_writebarrier_remember(values); - RARRAY_PTR_USE_TRANSIENT(values, ptr, { + RARRAY_PTR_USE(values, ptr, { size = ar_values(hash, ptr, size); }); } else if (RHASH_ST_TABLE_P(hash)) { st_table *table = RHASH_ST_TABLE(hash); rb_gc_writebarrier_remember(values); - RARRAY_PTR_USE_TRANSIENT(values, ptr, { + RARRAY_PTR_USE(values, ptr, { size = st_values(table, ptr, size); }); } |