ext/oj/mimic_json.c in oj-3.7.5 vs ext/oj/mimic_json.c in oj-3.7.6

- old
+ new

@@ -194,12 +194,12 @@ * Returns [_String_] a JSON string. */ static VALUE mimic_dump(int argc, VALUE *argv, VALUE self) { char buf[4096]; - struct _Out out; - struct _Options copts = oj_default_options; + struct _out out; + struct _options copts = oj_default_options; VALUE rstr; copts.str_rx.head = NULL; copts.str_rx.tail = NULL; out.buf = buf; @@ -352,11 +352,11 @@ } static VALUE mimic_generate_core(int argc, VALUE *argv, Options copts) { char buf[4096]; - struct _Out out; + struct _out out; VALUE rstr; out.buf = buf; out.end = buf + sizeof(buf) - 10; out.allocated = false; @@ -412,11 +412,11 @@ * * Returns [_String_] generated JSON. */ VALUE oj_mimic_generate(int argc, VALUE *argv, VALUE self) { - struct _Options copts = oj_default_options; + struct _options copts = oj_default_options; copts.str_rx.head = NULL; copts.str_rx.tail = NULL; return mimic_generate_core(argc, argv, &copts); @@ -430,11 +430,11 @@ * * Return [_String_] the generated JSON. */ VALUE oj_mimic_pretty_generate(int argc, VALUE *argv, VALUE self) { - struct _Options copts = oj_default_options; + struct _options copts = oj_default_options; VALUE rargs[2]; volatile VALUE h; // Some (all?) json gem to_json methods need a State instance and not just // a Hash. I haven't dug deep enough to find out why but using a State @@ -479,11 +479,11 @@ return mimic_generate_core(2, rargs, &copts); } static VALUE mimic_parse_core(int argc, VALUE *argv, VALUE self, bool bang) { - struct _ParseInfo pi; + struct _parseInfo pi; VALUE ropts; VALUE args[1]; rb_scan_args(argc, argv, "11", NULL, &ropts); parse_info_init(&pi); @@ -658,11 +658,11 @@ return oj_encode(rb_str_new_cstr(oj_default_options.create_id)); } return rb_str_new_cstr(oj_json_class); } -static struct _Options mimic_object_to_json_options = { +static struct _options mimic_object_to_json_options = { 0, // indent No, // circular No, // auto_define No, // sym_key JXEsc, // escape_mode @@ -715,12 +715,12 @@ }; static VALUE mimic_object_to_json(int argc, VALUE *argv, VALUE self) { char buf[4096]; - struct _Out out; + struct _out out; VALUE rstr; - struct _Options copts = oj_default_options; + struct _options copts = oj_default_options; copts.str_rx.head = NULL; copts.str_rx.tail = NULL; out.buf = buf; out.end = buf + sizeof(buf) - 10;