diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-13 05:19:12 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-13 05:19:12 +0000 |
commit | f5219fee6307461c7ead4358290958679d9d0d38 (patch) | |
tree | f54cbc4f820ffb7394b1e631ffd78465a0743321 /ext/json/generator/generator.c | |
parent | 4607f95f7380f3eeef16230a7d55e07dc4c9f6cc (diff) | |
download | ruby-f5219fee6307461c7ead4358290958679d9d0d38.tar.gz |
* ext/json: merge upstream from flori/json
change usage of TypedData. [Feature #10739][ruby-core:67564]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/generator/generator.c')
-rw-r--r-- | ext/json/generator/generator.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index 9641ecbb58..baf5360bb1 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 } /* |