summaryrefslogtreecommitdiff
path: root/ext/json/generator/generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/generator/generator.c')
-rw-r--r--ext/json/generator/generator.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 9641ecbb580..baf5360bb17 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -515,7 +515,7 @@ static size_t State_memsize(const void *ptr)
return size;
}
-#ifdef HAVE_TYPE_RB_DATA_TYPE_T
+#ifdef NEW_TYPEDDATA_WRAPPER
static const rb_data_type_t JSON_Generator_State_type = {
"JSON/Generator/State",
{NULL, State_free, State_memsize,},
@@ -535,11 +535,7 @@ static JSON_Generator_State *State_allocate(void)
static VALUE cState_s_allocate(VALUE klass)
{
JSON_Generator_State *state = State_allocate();
-#ifdef HAVE_TYPE_RB_DATA_TYPE_T
return TypedData_Wrap_Struct(klass, &JSON_Generator_State_type, state);
-#else
- return Data_Wrap_Struct(klass, NULL, State_free, state);
-#endif
}
/*