From 62b51d9ad7e42090d29ab48a1d5b7ad17313370b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 3 Dec 2024 13:30:49 -0500 Subject: Use BUILDING_SHARED_GC instead of RB_AMALGAMATED_DEFAULT_GC We can use the BUILDING_SHARED_GC flag to check if we're building gc_impl.h as a shared GC or building the default GC. --- gc/gc_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gc/gc_impl.h') diff --git a/gc/gc_impl.h b/gc/gc_impl.h index fc774a7c88..af53823b6b 100644 --- a/gc/gc_impl.h +++ b/gc/gc_impl.h @@ -10,6 +10,9 @@ */ #include "ruby/ruby.h" +#ifdef BUILDING_SHARED_GC +# define GC_IMPL_FN +#else // `GC_IMPL_FN` is an implementation detail of `!USE_SHARED_GC` builds // to have the default GC in the same translation unit as gc.c for // the sake of optimizer visibility. It expands to nothing unless @@ -18,10 +21,7 @@ // For the default GC, do not copy-paste this when implementing // these functions. This takes advantage of internal linkage winning // when appearing first. See C99 6.2.2p4. -#ifdef RB_AMALGAMATED_DEFAULT_GC # define GC_IMPL_FN static -#else -# define GC_IMPL_FN #endif // Bootup -- cgit v1.2.3