diff options
author | Peter Zhu <[email protected]> | 2022-07-20 15:30:19 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-07-21 09:02:45 -0400 |
commit | 1c9acb6bb1822f9d914b40dcea0b3ead849165cd (patch) | |
tree | 87455306e2093eb41b2d7a48ea69edd508f4c882 /transient_heap.c | |
parent | 4798a4fec213ce8a73a2d0d1c4ba879fb216ca3a (diff) |
Refactor macros of array.c
Move some macros in array.c to internal/array.h so that other files
can also access these macros.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6157
Diffstat (limited to 'transient_heap.c')
-rw-r--r-- | transient_heap.c | 3 |
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; |