Skip to content

Commit 2a4ebe8

Browse files
etiennebarriebyroot
authored andcommitted
Move RUBY_TYPED_FROZEN_SHAREABLE macro to json.h
1 parent 305d383 commit 2a4ebe8

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
@@ -1554,11 +1554,6 @@ static size_t JSON_ParserConfig_memsize(const void *ptr)
15541554
return sizeof(JSON_ParserConfig);
15551555
}
15561556

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

0 commit comments

Comments
 (0)