summaryrefslogtreecommitdiff
path: root/internal/imemo.h
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-07-25 10:40:45 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-07-26 09:12:09 -0400
commitefb91ff19b739b759f40af2673f942e80d212857 (patch)
treeace9d897856748fba7537390a6674695af23a0f3 /internal/imemo.h
parent3f70aa6504d4c63a3cc928c52d6cf88dafffb40d (diff)
Rename rb_ary_tmp_new to rb_ary_hidden_new
rb_ary_tmp_new suggests that the array is temporary in some way, but that's not true, it just creates an array that's hidden and not on the transient heap. This commit renames it to rb_ary_hidden_new.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6180
Diffstat (limited to 'internal/imemo.h')
-rw-r--r--internal/imemo.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/imemo.h b/internal/imemo.h
index 53d82eb20f..91b524e0a6 100644
--- a/internal/imemo.h
+++ b/internal/imemo.h
@@ -10,7 +10,7 @@
*/
#include "ruby/internal/config.h"
#include <stddef.h> /* for size_t */
-#include "internal/array.h" /* for rb_ary_tmp_new_fill */
+#include "internal/array.h" /* for rb_ary_hidden_new_fill */
#include "internal/gc.h" /* for RB_OBJ_WRITE */
#include "ruby/internal/stdbool.h" /* for bool */
#include "ruby/ruby.h" /* for rb_block_call_func_t */
@@ -121,9 +121,9 @@ struct MEMO {
#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
#define NEW_MEMO_FOR(type, value) \
- ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
#define NEW_PARTIAL_MEMO_FOR(type, value, member) \
- ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), \
+ ((value) = rb_ary_hidden_new_fill(type_roomof(type, VALUE)), \
rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
MEMO_FOR(type, value))