summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Barrié <etienne.barrie@gmail.com>2025-11-21 12:48:21 +0100
committergit <svn-admin@ruby-lang.org>2025-11-21 16:12:35 +0000
commitffa105c27f943bf4170247137733ff7640cf24d0 (patch)
tree117b368a1c797262ed640eb89183c199549957c9
parent419efd5ca5064e8f492660a898be36fe4f79b84a (diff)
[ruby/json] Move RUBY_TYPED_FROZEN_SHAREABLE macro to json.h
https://github.com/ruby/json/commit/2a4ebe8250
-rw-r--r--ext/json/generator/generator.c5
-rw-r--r--ext/json/json.h5
-rw-r--r--ext/json/parser/parser.c5
3 files changed, 5 insertions, 10 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 2fb00ee278..8d04bef53f 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -926,11 +926,6 @@ static size_t State_memsize(const void *ptr)
return sizeof(JSON_Generator_State);
}
-#ifndef HAVE_RB_EXT_RACTOR_SAFE
-# undef RUBY_TYPED_FROZEN_SHAREABLE
-# define RUBY_TYPED_FROZEN_SHAREABLE 0
-#endif
-
static const rb_data_type_t JSON_Generator_State_type = {
"JSON/Generator/State",
{
diff --git a/ext/json/json.h b/ext/json/json.h
index 01fe0cd034..28efa04c25 100644
--- a/ext/json/json.h
+++ b/ext/json/json.h
@@ -45,6 +45,11 @@ typedef unsigned char _Bool;
#endif
#endif
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+# undef RUBY_TYPED_FROZEN_SHAREABLE
+# define RUBY_TYPED_FROZEN_SHAREABLE 0
+#endif
+
#ifndef NORETURN
#define NORETURN(x) x
#endif
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index e23945d0e5..2dcd1012b1 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -1554,11 +1554,6 @@ static size_t JSON_ParserConfig_memsize(const void *ptr)
return sizeof(JSON_ParserConfig);
}
-#ifndef HAVE_RB_EXT_RACTOR_SAFE
-# undef RUBY_TYPED_FROZEN_SHAREABLE
-# define RUBY_TYPED_FROZEN_SHAREABLE 0
-#endif
-
static const rb_data_type_t JSON_ParserConfig_type = {
"JSON::Ext::Parser/ParserConfig",
{