aboutsummaryrefslogtreecommitdiffstats
path: root/ext/json/parser/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/parser/parser.c')
-rw-r--r--ext/json/parser/parser.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index 57f87432b6..7e44d469f8 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -2097,12 +2097,12 @@ case 9:
static void JSON_mark(void *ptr)
{
JSON_Parser *json = ptr;
- rb_gc_mark_maybe(json->Vsource);
- rb_gc_mark_maybe(json->create_id);
- rb_gc_mark_maybe(json->object_class);
- rb_gc_mark_maybe(json->array_class);
- rb_gc_mark_maybe(json->decimal_class);
- rb_gc_mark_maybe(json->match_string);
+ rb_gc_mark(json->Vsource);
+ rb_gc_mark(json->create_id);
+ rb_gc_mark(json->object_class);
+ rb_gc_mark(json->array_class);
+ rb_gc_mark(json->decimal_class);
+ rb_gc_mark(json->match_string);
}
static void JSON_free(void *ptr)
@@ -2118,16 +2118,12 @@ static size_t JSON_memsize(const void *ptr)
return sizeof(*json) + FBUFFER_CAPA(json->fbuffer);
}
-#ifdef NEW_TYPEDDATA_WRAPPER
static const rb_data_type_t JSON_Parser_type = {
"JSON/Parser",
{JSON_mark, JSON_free, JSON_memsize,},
-#ifdef RUBY_TYPED_FREE_IMMEDIATELY
0, 0,
RUBY_TYPED_FREE_IMMEDIATELY,
-#endif
};
-#endif
static VALUE cJSON_parser_s_allocate(VALUE klass)
{