summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc.c1
-rw-r--r--gc/gc_impl.h6
2 files changed, 3 insertions, 4 deletions
diff --git a/gc.c b/gc.c
index 4124d8e42d..13cf3990a0 100644
--- a/gc.c
+++ b/gc.c
@@ -615,7 +615,6 @@ rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val)
#endif
static const char *obj_type_name(VALUE obj);
-#define RB_AMALGAMATED_DEFAULT_GC
#include "gc/default/default.c"
#if USE_SHARED_GC && !defined(HAVE_DLOPEN)
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