Skip to content

Commit 1219ce0

Browse files
committed
Move RUBY_TYPED_FROZEN_SHAREABLE macro to json.h
1 parent b7e1734 commit 1219ce0

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

ext/json/ext/generator/generator.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -926,11 +926,6 @@ static size_t State_memsize(const void *ptr)
926926
return sizeof(JSON_Generator_State);
927927
}
928928

929-
#ifndef HAVE_RB_EXT_RACTOR_SAFE
930-
# undef RUBY_TYPED_FROZEN_SHAREABLE
931-
# define RUBY_TYPED_FROZEN_SHAREABLE 0
932-
#endif
933-
934929
static const rb_data_type_t JSON_Generator_State_type = {
935930
"JSON/Generator/State",
936931
{

ext/json/ext/json.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ typedef unsigned char _Bool;
4545
#endif
4646
#endif
4747

48+
#ifndef HAVE_RB_EXT_RACTOR_SAFE
49+
# undef RUBY_TYPED_FROZEN_SHAREABLE
50+
# define RUBY_TYPED_FROZEN_SHAREABLE 0
51+
#endif
52+
4853
#ifndef NORETURN
4954
#define NORETURN(x) x
5055
#endif

ext/json/ext/parser/parser.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,11 +1555,6 @@ static size_t JSON_ParserConfig_memsize(const void *ptr)
15551555
return sizeof(JSON_ParserConfig);
15561556
}
15571557

1558-
#ifndef HAVE_RB_EXT_RACTOR_SAFE
1559-
# undef RUBY_TYPED_FROZEN_SHAREABLE
1560-
# define RUBY_TYPED_FROZEN_SHAREABLE 0
1561-
#endif
1562-
15631558
static const rb_data_type_t JSON_ParserConfig_type = {
15641559
"JSON::Ext::Parser/ParserConfig",
15651560
{

0 commit comments

Comments
 (0)