Ruby  2.4.2p198(2017-09-14revision59899)
Functions | Variables
generator.c File Reference
#include "../fbuffer/fbuffer.h"
#include "generator.h"
Include dependency graph for generator.c:

Go to the source code of this file.

Functions

static unsigned char isLegalUTF8 (const UTF8 *source, unsigned long length)
 
static void unicode_escape (char *buf, UTF16 character)
 
static void unicode_escape_to_buffer (FBuffer *buffer, char buf[6], UTF16 character)
 
static void convert_UTF8_to_JSON_ASCII (FBuffer *buffer, VALUE string)
 
static void convert_UTF8_to_JSON (FBuffer *buffer, VALUE string)
 
static char * fstrndup (const char *ptr, unsigned long len)
 
static VALUE mHash_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mArray_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mInteger_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mFloat_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mString_included_s (VALUE self, VALUE modul)
 
static VALUE mString_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mString_to_json_raw_object (VALUE self)
 
static VALUE mString_to_json_raw (int argc, VALUE *argv, VALUE self)
 
static VALUE mString_Extend_json_create (VALUE self, VALUE o)
 
static VALUE mTrueClass_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mFalseClass_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mNilClass_to_json (int argc, VALUE *argv, VALUE self)
 
static VALUE mObject_to_json (int argc, VALUE *argv, VALUE self)
 
static void State_free (void *ptr)
 
static size_t State_memsize (const void *ptr)
 
static VALUE cState_s_allocate (VALUE klass)
 
static VALUE cState_configure (VALUE self, VALUE opts)
 
static void set_state_ivars (VALUE hash, VALUE state)
 
static VALUE cState_to_h (VALUE self)
 
static VALUE cState_aref (VALUE self, VALUE name)
 
static VALUE cState_aset (VALUE self, VALUE name, VALUE value)
 
static void generate_json_object (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_array (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_string (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_null (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_false (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_true (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_fixnum (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_bignum (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_integer (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json_float (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static void generate_json (FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
 
static FBuffercState_prepare_buffer (VALUE self)
 
static VALUE cState_partial_generate (VALUE self, VALUE obj)
 
static VALUE cState_generate (VALUE self, VALUE obj)
 
static VALUE cState_initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE cState_init_copy (VALUE obj, VALUE orig)
 
static VALUE cState_from_state_s (VALUE self, VALUE opts)
 
static VALUE cState_indent (VALUE self)
 
static VALUE cState_indent_set (VALUE self, VALUE indent)
 
static VALUE cState_space (VALUE self)
 
static VALUE cState_space_set (VALUE self, VALUE space)
 
static VALUE cState_space_before (VALUE self)
 
static VALUE cState_space_before_set (VALUE self, VALUE space_before)
 
static VALUE cState_object_nl (VALUE self)
 
static VALUE cState_object_nl_set (VALUE self, VALUE object_nl)
 
static VALUE cState_array_nl (VALUE self)
 
static VALUE cState_array_nl_set (VALUE self, VALUE array_nl)
 
static VALUE cState_check_circular_p (VALUE self)
 
static VALUE cState_max_nesting (VALUE self)
 
static VALUE cState_max_nesting_set (VALUE self, VALUE depth)
 
static VALUE cState_allow_nan_p (VALUE self)
 
static VALUE cState_ascii_only_p (VALUE self)
 
static VALUE cState_depth (VALUE self)
 
static VALUE cState_depth_set (VALUE self, VALUE depth)
 
static VALUE cState_buffer_initial_length (VALUE self)
 
static VALUE cState_buffer_initial_length_set (VALUE self, VALUE buffer_initial_length)
 
void Init_generator (void)
 

Variables

static VALUE CEncoding_UTF_8
 
static ID i_encoding
 
static ID i_encode
 
static VALUE mJSON
 
static VALUE mExt
 
static VALUE mGenerator
 
static VALUE cState
 
static VALUE mGeneratorMethods
 
static VALUE mObject
 
static VALUE mHash
 
static VALUE mArray
 
static VALUE mInteger
 
static VALUE mFloat
 
static VALUE mString
 
static VALUE mString_Extend
 
static VALUE mTrueClass
 
static VALUE mFalseClass
 
static VALUE mNilClass
 
static VALUE eGeneratorError
 
static VALUE eNestingError
 
static VALUE CRegexp_MULTILINE
 
static VALUE CJSON_SAFE_STATE_PROTOTYPE
 
static VALUE i_SAFE_STATE_PROTOTYPE
 
static ID i_to_s
 
static ID i_to_json
 
static ID i_new
 
static ID i_indent
 
static ID i_space
 
static ID i_space_before
 
static ID i_object_nl
 
static ID i_array_nl
 
static ID i_max_nesting
 
static ID i_allow_nan
 
static ID i_ascii_only
 
static ID i_pack
 
static ID i_unpack
 
static ID i_create_id
 
static ID i_extend
 
static ID i_key_p
 
static ID i_aref
 
static ID i_send
 
static ID i_respond_to_p
 
static ID i_match
 
static ID i_keys
 
static ID i_depth
 
static ID i_buffer_initial_length
 
static ID i_dup
 
static const char trailingBytesForUTF8 [256]
 
static const UTF32 offsetsFromUTF8 [6]
 
static const rb_data_type_t JSON_Generator_State_type
 

Function Documentation

◆ convert_UTF8_to_JSON()

static void convert_UTF8_to_JSON ( FBuffer buffer,
VALUE  string 
)
static

◆ convert_UTF8_to_JSON_ASCII()

static void convert_UTF8_to_JSON_ASCII ( FBuffer buffer,
VALUE  string 
)
static

◆ cState_allow_nan_p()

static VALUE cState_allow_nan_p ( VALUE  self)
static

Definition at line 1261 of file generator.c.

References GET_STATE, Qfalse, and Qtrue.

Referenced by Init_generator().

◆ cState_aref()

static VALUE cState_aref ( VALUE  self,
VALUE  name 
)
static

◆ cState_array_nl()

static VALUE cState_array_nl ( VALUE  self)
static

Definition at line 1187 of file generator.c.

References GET_STATE, rb_str_new(), and rb_str_new2.

Referenced by Init_generator().

◆ cState_array_nl_set()

static VALUE cState_array_nl_set ( VALUE  self,
VALUE  array_nl 
)
static

Definition at line 1198 of file generator.c.

References Check_Type, fstrndup(), GET_STATE, len, NULL, Qnil, RSTRING_LEN, RSTRING_PTR, ruby_xfree(), and T_STRING.

Referenced by Init_generator().

◆ cState_ascii_only_p()

static VALUE cState_ascii_only_p ( VALUE  self)
static

Definition at line 1273 of file generator.c.

References GET_STATE, Qfalse, and Qtrue.

Referenced by Init_generator().

◆ cState_aset()

static VALUE cState_aset ( VALUE  self,
VALUE  name,
VALUE  value 
)
static

◆ cState_buffer_initial_length()

static VALUE cState_buffer_initial_length ( VALUE  self)
static

Definition at line 1309 of file generator.c.

References GET_STATE, and LONG2FIX.

Referenced by Init_generator().

◆ cState_buffer_initial_length_set()

static VALUE cState_buffer_initial_length_set ( VALUE  self,
VALUE  buffer_initial_length 
)
static

Definition at line 1321 of file generator.c.

References Check_Type, FIX2LONG, GET_STATE, Qnil, and T_FIXNUM.

Referenced by Init_generator().

◆ cState_check_circular_p()

static VALUE cState_check_circular_p ( VALUE  self)
static

Definition at line 1224 of file generator.c.

References GET_STATE, Qfalse, and Qtrue.

Referenced by Init_generator().

◆ cState_configure()

static VALUE cState_configure ( VALUE  self,
VALUE  opts 
)
static

◆ cState_depth()

static VALUE cState_depth ( VALUE  self)
static

Definition at line 1284 of file generator.c.

References GET_STATE, and LONG2FIX.

Referenced by Init_generator().

◆ cState_depth_set()

static VALUE cState_depth_set ( VALUE  self,
VALUE  depth 
)
static

Definition at line 1296 of file generator.c.

References Check_Type, FIX2LONG, GET_STATE, Qnil, and T_FIXNUM.

Referenced by Init_generator().

◆ cState_from_state_s()

static VALUE cState_from_state_s ( VALUE  self,
VALUE  opts 
)
static

◆ cState_generate()

static VALUE cState_generate ( VALUE  self,
VALUE  obj 
)
static

Definition at line 950 of file generator.c.

References cState_partial_generate(), GET_STATE, and result.

Referenced by Init_generator().

◆ cState_indent()

static VALUE cState_indent ( VALUE  self)
static

Definition at line 1040 of file generator.c.

References GET_STATE, rb_str_new(), and rb_str_new2.

Referenced by Init_generator().

◆ cState_indent_set()

static VALUE cState_indent_set ( VALUE  self,
VALUE  indent 
)
static

Definition at line 1051 of file generator.c.

References Check_Type, fstrndup(), GET_STATE, len, NULL, Qnil, RSTRING_LEN, RSTRING_PTR, ruby_xfree(), and T_STRING.

Referenced by Init_generator().

◆ cState_init_copy()

static VALUE cState_init_copy ( VALUE  obj,
VALUE  orig 
)
static

◆ cState_initialize()

static VALUE cState_initialize ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 976 of file generator.c.

References cState_configure(), FBUFFER_INITIAL_LENGTH_DEFAULT, GET_STATE, NIL_P, and rb_scan_args().

Referenced by Init_generator().

◆ cState_max_nesting()

static VALUE cState_max_nesting ( VALUE  self)
static

Definition at line 1236 of file generator.c.

References GET_STATE, and LONG2FIX.

Referenced by Init_generator().

◆ cState_max_nesting_set()

static VALUE cState_max_nesting_set ( VALUE  self,
VALUE  depth 
)
static

Definition at line 1248 of file generator.c.

References Check_Type, FIX2LONG, GET_STATE, and T_FIXNUM.

Referenced by Init_generator().

◆ cState_object_nl()

static VALUE cState_object_nl ( VALUE  self)
static

Definition at line 1151 of file generator.c.

References GET_STATE, rb_str_new(), and rb_str_new2.

Referenced by Init_generator().

◆ cState_object_nl_set()

static VALUE cState_object_nl_set ( VALUE  self,
VALUE  object_nl 
)
static

Definition at line 1163 of file generator.c.

References Check_Type, fstrndup(), GET_STATE, len, NULL, Qnil, RSTRING_LEN, RSTRING_PTR, ruby_xfree(), and T_STRING.

Referenced by Init_generator().

◆ cState_partial_generate()

static VALUE cState_partial_generate ( VALUE  self,
VALUE  obj 
)
static

Definition at line 935 of file generator.c.

References cState_prepare_buffer(), generate_json(), and GET_STATE.

Referenced by cState_generate(), and mObject_to_json().

◆ cState_prepare_buffer()

static FBuffer* cState_prepare_buffer ( VALUE  self)
static

◆ cState_s_allocate()

static VALUE cState_s_allocate ( VALUE  klass)
static

Definition at line 549 of file generator.c.

References TypedData_Make_Struct.

Referenced by Init_generator().

◆ cState_space()

static VALUE cState_space ( VALUE  self)
static

Definition at line 1077 of file generator.c.

References GET_STATE, rb_str_new(), and rb_str_new2.

Referenced by Init_generator().

◆ cState_space_before()

static VALUE cState_space_before ( VALUE  self)
static

Definition at line 1114 of file generator.c.

References GET_STATE, rb_str_new(), and rb_str_new2.

Referenced by Init_generator().

◆ cState_space_before_set()

static VALUE cState_space_before_set ( VALUE  self,
VALUE  space_before 
)
static

Definition at line 1125 of file generator.c.

References Check_Type, fstrndup(), GET_STATE, len, NULL, Qnil, RSTRING_LEN, RSTRING_PTR, ruby_xfree(), and T_STRING.

Referenced by Init_generator().

◆ cState_space_set()

static VALUE cState_space_set ( VALUE  self,
VALUE  space 
)
static

Definition at line 1089 of file generator.c.

References Check_Type, fstrndup(), GET_STATE, len, NULL, Qnil, RSTRING_LEN, RSTRING_PTR, ruby_xfree(), and T_STRING.

Referenced by Init_generator().

◆ cState_to_h()

static VALUE cState_to_h ( VALUE  self)
static

◆ fstrndup()

static char* fstrndup ( const char *  ptr,
unsigned long  len 
)
static

◆ generate_json()

static void generate_json ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

◆ generate_json_array()

static void generate_json_array ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

◆ generate_json_bignum()

static void generate_json_bignum ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 839 of file generator.c.

References i_to_s, and rb_funcall().

Referenced by generate_json(), and generate_json_integer().

◆ generate_json_false()

static void generate_json_false ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 824 of file generator.c.

References fbuffer_append().

Referenced by generate_json().

◆ generate_json_fixnum()

static void generate_json_fixnum ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 834 of file generator.c.

References FIX2LONG.

Referenced by generate_json(), and generate_json_integer().

◆ generate_json_float()

static void generate_json_float ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

◆ generate_json_integer()

static void generate_json_integer ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 846 of file generator.c.

References FIXNUM_P, generate_json_bignum(), and generate_json_fixnum().

◆ generate_json_null()

static void generate_json_null ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 819 of file generator.c.

References fbuffer_append().

Referenced by generate_json().

◆ generate_json_object()

static void generate_json_object ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

◆ generate_json_string()

static void generate_json_string ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

◆ generate_json_true()

static void generate_json_true ( FBuffer buffer,
VALUE  Vstate,
JSON_Generator_State state,
VALUE  obj 
)
static

Definition at line 829 of file generator.c.

References fbuffer_append().

Referenced by generate_json().

◆ Init_generator()

void Init_generator ( void  )

Definition at line 1336 of file generator.c.

References CEncoding_UTF_8, CJSON_SAFE_STATE_PROTOTYPE, CRegexp_MULTILINE, cState, cState_allow_nan_p(), cState_aref(), cState_array_nl(), cState_array_nl_set(), cState_ascii_only_p(), cState_aset(), cState_buffer_initial_length(), cState_buffer_initial_length_set(), cState_check_circular_p(), cState_configure(), cState_depth(), cState_depth_set(), cState_from_state_s(), cState_generate(), cState_indent(), cState_indent_set(), cState_init_copy(), cState_initialize(), cState_max_nesting(), cState_max_nesting_set(), cState_object_nl(), cState_object_nl_set(), cState_s_allocate(), cState_space(), cState_space_before(), cState_space_before_set(), cState_space_set(), cState_to_h(), eGeneratorError, eNestingError, i_allow_nan, i_aref, i_array_nl, i_ascii_only, i_buffer_initial_length, i_create_id, i_depth, i_dup, i_encode, i_encoding, i_extend, i_indent, i_key_p, i_keys, i_match, i_max_nesting, i_new, i_object_nl, i_pack, i_respond_to_p, i_SAFE_STATE_PROTOTYPE, i_send, i_space, i_space_before, i_to_json, i_to_s, i_unpack, mArray, mArray_to_json(), mExt, mFalseClass, mFalseClass_to_json(), mFloat, mFloat_to_json(), mGenerator, mGeneratorMethods, mHash, mHash_to_json(), mInteger, mInteger_to_json(), mJSON, mNilClass, mNilClass_to_json(), mObject, mObject_to_json(), mString, mString_Extend, mString_Extend_json_create(), mString_included_s(), mString_to_json(), mString_to_json_raw(), mString_to_json_raw_object(), mTrueClass, mTrueClass_to_json(), Qnil, rb_cObject, rb_const_get(), rb_cRegexp, rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module(), rb_define_module_under(), rb_define_singleton_method(), rb_funcall(), rb_intern, rb_path2class(), rb_require(), and rb_str_new2.

◆ isLegalUTF8()

static unsigned char isLegalUTF8 ( const UTF8 source,
unsigned long  length 
)
static

Definition at line 85 of file generator.c.

Referenced by convert_UTF8_to_JSON(), and convert_UTF8_to_JSON_ASCII().

◆ mArray_to_json()

static VALUE mArray_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 348 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ mFalseClass_to_json()

static VALUE mFalseClass_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 477 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ mFloat_to_json()

static VALUE mFloat_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 390 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ mHash_to_json()

static VALUE mHash_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 335 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator(), and mString_to_json_raw().

◆ mInteger_to_json()

static VALUE mInteger_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 358 of file generator.c.

References argc, argv, and GENERATE_JSON.

Referenced by Init_generator().

◆ mNilClass_to_json()

static VALUE mNilClass_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 487 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ mObject_to_json()

static VALUE mObject_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ mString_Extend_json_create()

static VALUE mString_Extend_json_create ( VALUE  self,
VALUE  o 
)
static

Definition at line 454 of file generator.c.

References Check_Type, i_pack, rb_funcall(), rb_hash_aref(), rb_str_new2, and T_HASH.

Referenced by Init_generator().

◆ mString_included_s()

static VALUE mString_included_s ( VALUE  self,
VALUE  modul 
)
static

Definition at line 400 of file generator.c.

References i_extend, mString_Extend, rb_funcall(), and result.

Referenced by Init_generator().

◆ mString_to_json()

static VALUE mString_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 412 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ mString_to_json_raw()

static VALUE mString_to_json_raw ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 441 of file generator.c.

References Check_Type, mHash_to_json(), mString_to_json_raw_object(), and T_HASH.

Referenced by Init_generator().

◆ mString_to_json_raw_object()

static VALUE mString_to_json_raw_object ( VALUE  self)
static

◆ mTrueClass_to_json()

static VALUE mTrueClass_to_json ( int  argc,
VALUE argv,
VALUE  self 
)
static

Definition at line 467 of file generator.c.

References GENERATE_JSON.

Referenced by Init_generator().

◆ set_state_ivars()

static void set_state_ivars ( VALUE  hash,
VALUE  state 
)
static

◆ State_free()

static void State_free ( void *  ptr)
static

◆ State_memsize()

static size_t State_memsize ( const void *  ptr)
static

◆ unicode_escape()

static void unicode_escape ( char *  buf,
UTF16  character 
)
static

Definition at line 112 of file generator.c.

Referenced by convert_UTF8_to_JSON(), and unicode_escape_to_buffer().

◆ unicode_escape_to_buffer()

static void unicode_escape_to_buffer ( FBuffer buffer,
char  buf[6],
UTF16  character 
)
static

Definition at line 124 of file generator.c.

References fbuffer_append(), and unicode_escape().

Referenced by convert_UTF8_to_JSON_ASCII().

Variable Documentation

◆ CEncoding_UTF_8

VALUE CEncoding_UTF_8
static

Definition at line 5 of file generator.c.

Referenced by generate_json_string(), and Init_generator().

◆ CJSON_SAFE_STATE_PROTOTYPE

VALUE CJSON_SAFE_STATE_PROTOTYPE
static

Definition at line 9 of file generator.c.

Referenced by cState_from_state_s(), and Init_generator().

◆ CRegexp_MULTILINE

VALUE CRegexp_MULTILINE
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ cState

VALUE cState
static

Definition at line 9 of file generator.c.

Referenced by Init_generator(), and mObject_to_json().

◆ eGeneratorError

VALUE eGeneratorError
static

Definition at line 9 of file generator.c.

Referenced by generate_json_float(), and Init_generator().

◆ eNestingError

VALUE eNestingError
static

Definition at line 9 of file generator.c.

Referenced by generate_json_array(), generate_json_object(), and Init_generator().

◆ i_allow_nan

ID i_allow_nan
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_aref

ID i_aref
static

Definition at line 21 of file generator.c.

Referenced by Init_generator().

◆ i_array_nl

ID i_array_nl
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_ascii_only

ID i_ascii_only
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_buffer_initial_length

ID i_buffer_initial_length
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_create_id

ID i_create_id
static

Definition at line 21 of file generator.c.

Referenced by Init_generator(), and mString_to_json_raw_object().

◆ i_depth

ID i_depth
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_dup

ID i_dup
static

Definition at line 21 of file generator.c.

Referenced by cState_from_state_s(), and Init_generator().

◆ i_encode

ID i_encode
static

Definition at line 6 of file generator.c.

Referenced by generate_json_string(), and Init_generator().

◆ i_encoding

ID i_encoding
static

Definition at line 6 of file generator.c.

Referenced by Init_generator().

◆ i_extend

ID i_extend
static

Definition at line 21 of file generator.c.

Referenced by Init_generator(), and mString_included_s().

◆ i_indent

ID i_indent
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_key_p

ID i_key_p
static

Definition at line 21 of file generator.c.

Referenced by Init_generator().

◆ i_keys

ID i_keys
static

Definition at line 21 of file generator.c.

Referenced by generate_json_object(), and Init_generator().

◆ i_match

ID i_match
static

Definition at line 21 of file generator.c.

Referenced by Init_generator().

◆ i_max_nesting

ID i_max_nesting
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_new

ID i_new
static

Definition at line 21 of file generator.c.

Referenced by cState_from_state_s(), and Init_generator().

◆ i_object_nl

ID i_object_nl
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_pack

ID i_pack
static

Definition at line 21 of file generator.c.

Referenced by Init_generator(), and mString_Extend_json_create().

◆ i_respond_to_p

ID i_respond_to_p
static

Definition at line 21 of file generator.c.

Referenced by cState_aref(), cState_aset(), and Init_generator().

◆ i_SAFE_STATE_PROTOTYPE

VALUE i_SAFE_STATE_PROTOTYPE
static

Definition at line 9 of file generator.c.

Referenced by cState_from_state_s(), and Init_generator().

◆ i_send

ID i_send
static

Definition at line 21 of file generator.c.

Referenced by cState_aref(), cState_aset(), and Init_generator().

◆ i_space

ID i_space
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_space_before

ID i_space_before
static

Definition at line 21 of file generator.c.

Referenced by cState_configure(), cState_to_h(), and Init_generator().

◆ i_to_json

ID i_to_json
static

Definition at line 21 of file generator.c.

Referenced by generate_json(), and Init_generator().

◆ i_to_s

ID i_to_s
static

◆ i_unpack

ID i_unpack
static

Definition at line 21 of file generator.c.

Referenced by Init_generator(), and mString_to_json_raw_object().

◆ JSON_Generator_State_type

const rb_data_type_t JSON_Generator_State_type
static
Initial value:
= {
"JSON/Generator/State",
0, 0,
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void State_free(void *ptr)
Definition: generator.c:509
static size_t State_memsize(const void *ptr)
Definition: generator.c:523
#define NULL
Definition: _sdbm.c:102

Definition at line 539 of file generator.c.

◆ mArray

VALUE mArray
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mExt

VALUE mExt
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mFalseClass

VALUE mFalseClass
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mFloat

VALUE mFloat
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mGenerator

VALUE mGenerator
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mGeneratorMethods

VALUE mGeneratorMethods
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mHash

VALUE mHash
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mInteger

VALUE mInteger
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mJSON

VALUE mJSON
static

Definition at line 9 of file generator.c.

Referenced by cState_from_state_s(), Init_generator(), and mString_to_json_raw_object().

◆ mNilClass

VALUE mNilClass
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mObject

VALUE mObject
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mString

VALUE mString
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ mString_Extend

VALUE mString_Extend
static

Definition at line 9 of file generator.c.

Referenced by Init_generator(), and mString_included_s().

◆ mTrueClass

VALUE mTrueClass
static

Definition at line 9 of file generator.c.

Referenced by Init_generator().

◆ offsetsFromUTF8

const UTF32 offsetsFromUTF8[6]
static
Initial value:
= { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL }

Definition at line 72 of file generator.c.

Referenced by convert_UTF8_to_JSON_ASCII().

◆ trailingBytesForUTF8

const char trailingBytesForUTF8[256]
static
Initial value:
= {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}

Definition at line 56 of file generator.c.

Referenced by convert_UTF8_to_JSON(), and convert_UTF8_to_JSON_ASCII().