ruby-changes:60285
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 4 Mar 2020 12:31:15 +0900 (JST)
Subject: [ruby-changes:60285] 2325017477 (master): fix compile error w/ -DUSE_TRANSIENT_HEAP=0
https://git.ruby-lang.org/ruby.git/commit/?id=2325017477 From 2325017477e0ee9f557b07a73f187a83ae5036a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Tue, 25 Feb 2020 12:42:00 +0900 Subject: fix compile error w/ -DUSE_TRANSIENT_HEAP=0 rb_transient_heap_managed_ptr_p is available only when USE_TRANSIENT_HEAP. Need #if guards. diff --git a/array.c b/array.c index d5650cf..0686eec 100644 --- a/array.c +++ b/array.c @@ -216,9 +216,11 @@ ary_verify_(VALUE ary, const char *file, int line) https://github.com/ruby/ruby/blob/trunk/array.c#L216 #endif } +#if USE_TRANSIENT_HEAP if (RARRAY_TRANSIENT_P(ary)) { assert(rb_transient_heap_managed_ptr_p(RARRAY_CONST_PTR_TRANSIENT(ary))); } +#endif rb_transient_heap_verify(); diff --git a/hash.c b/hash.c index 0967bff..21bccea 100644 --- a/hash.c +++ b/hash.c @@ -528,11 +528,13 @@ hash_verify_(VALUE hash, const char *file, int line) https://github.com/ruby/ruby/blob/trunk/hash.c#L528 HASH_ASSERT(RHASH_AR_TABLE_BOUND_RAW(hash) == 0); } +#if USE_TRANSIENT_HEP if (RHASH_TRANSIENT_P(hash)) { volatile st_data_t MAYBE_UNUSED(key) = RHASH_AR_TABLE_REF(hash, 0)->key; /* read */ HASH_ASSERT(RHASH_AR_TABLE(hash) != NULL); HASH_ASSERT(rb_transient_heap_managed_ptr_p(RHASH_AR_TABLE(hash))); } +#endif return hash; } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/