summaryrefslogtreecommitdiff
path: root/transient_heap.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-07-20 15:30:19 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-07-21 09:02:45 -0400
commit1c9acb6bb1822f9d914b40dcea0b3ead849165cd (patch)
tree87455306e2093eb41b2d7a48ea69edd508f4c882 /transient_heap.c
parent4798a4fec213ce8a73a2d0d1c4ba879fb216ca3a (diff)
downloadruby-1c9acb6bb1822f9d914b40dcea0b3ead849165cd.tar.gz
Refactor macros of array.c
Move some macros in array.c to internal/array.h so that other files can also access these macros.
Diffstat (limited to 'transient_heap.c')
-rw-r--r--transient_heap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/transient_heap.c b/transient_heap.c
index ba6f87aa69..ddf40d1041 100644
--- a/transient_heap.c
+++ b/transient_heap.c
@@ -9,6 +9,7 @@
#include "debug_counter.h"
#include "gc.h"
#include "internal.h"
+#include "internal/array.h"
#include "internal/gc.h"
#include "internal/hash.h"
#include "internal/sanitizers.h"
@@ -592,7 +593,7 @@ transient_heap_ptr(VALUE obj, int error)
switch (BUILTIN_TYPE(obj)) {
case T_ARRAY:
if (RARRAY_TRANSIENT_P(obj)) {
- TH_ASSERT(!FL_TEST_RAW(obj, RARRAY_EMBED_FLAG));
+ TH_ASSERT(!ARY_EMBED_P(obj));
ptr = RARRAY(obj)->as.heap.ptr;
}
break;