summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-20 01:19:47 +0000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-31 13:39:04 +0900
commit59b29a5f991eaa4e1a66d4ba90e647460f778031 (patch)
tree3b7d0efa504a32fc7118b2ced01e1c6a836a37ab
parentbc311ad5f0bca668fdac369fc2b2f1bfc001631c (diff)
downloadjson-59b29a5f991eaa4e1a66d4ba90e647460f778031.tar.gz
Add `GC.compact` again.
🙏 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/json/ext/generator/generator.c2
-rw-r--r--ext/json/ext/parser/parser.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index 871f258..881435e 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -1399,6 +1399,8 @@ void Init_generator(void)
eGeneratorError = rb_path2class("JSON::GeneratorError");
eNestingError = rb_path2class("JSON::NestingError");
+ rb_gc_register_mark_object(eGeneratorError);
+ rb_gc_register_mark_object(eNestingError);
cState = rb_define_class_under(mGenerator, "State", rb_cObject);
rb_define_alloc_func(cState, cState_s_allocate);
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c
index 79ca067..d918022 100644
--- a/ext/json/ext/parser/parser.c
+++ b/ext/json/ext/parser/parser.c
@@ -2089,6 +2089,8 @@ void Init_parser(void)
cParser = rb_define_class_under(mExt, "Parser", rb_cObject);
eParserError = rb_path2class("JSON::ParserError");
eNestingError = rb_path2class("JSON::NestingError");
+ rb_gc_register_mark_object(eParserError);
+ rb_gc_register_mark_object(eNestingError);
rb_define_alloc_func(cParser, cJSON_parser_s_allocate);
rb_define_method(cParser, "initialize", cParser_initialize, -1);
rb_define_method(cParser, "parse", cParser_parse, 0);