mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/json: for ancient backward compatibilities
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9f384d430
commit
5547719573
5 changed files with 33 additions and 0 deletions
|
@ -49,9 +49,15 @@ typedef struct JSON_ParserStruct {
|
|||
#define GET_PARSER \
|
||||
GET_PARSER_INIT; \
|
||||
if (!json->Vsource) rb_raise(rb_eTypeError, "uninitialized instance")
|
||||
#ifdef HAVE_TYPE_RB_DATA_TYPE_T
|
||||
#define GET_PARSER_INIT \
|
||||
JSON_Parser *json; \
|
||||
TypedData_Get_Struct(self, JSON_Parser, &JSON_Parser_type, json)
|
||||
#else
|
||||
#define GET_PARSER_INIT \
|
||||
JSON_Parser *json; \
|
||||
Data_Get_Struct(self, JSON_Parser, json)
|
||||
#endif
|
||||
|
||||
#define MinusInfinity "-Infinity"
|
||||
#define EVIL 0x666
|
||||
|
@ -73,7 +79,9 @@ static void JSON_mark(void *json);
|
|||
static void JSON_free(void *json);
|
||||
static VALUE cJSON_parser_s_allocate(VALUE klass);
|
||||
static VALUE cParser_source(VALUE self);
|
||||
#ifdef HAVE_TYPE_RB_DATA_TYPE_T
|
||||
static const rb_data_type_t JSON_Parser_type;
|
||||
#endif
|
||||
|
||||
#ifndef ZALLOC
|
||||
#define ZALLOC(type) ((type *)ruby_zalloc(sizeof(type)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue