oj 2.18.5 → 3.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1452 -0
- data/README.md +53 -221
- data/RELEASE_NOTES.md +61 -0
- data/ext/oj/buf.h +54 -72
- data/ext/oj/cache.c +329 -0
- data/ext/oj/cache.h +22 -0
- data/ext/oj/cache8.c +61 -63
- data/ext/oj/cache8.h +12 -39
- data/ext/oj/circarray.c +38 -67
- data/ext/oj/circarray.h +16 -42
- data/ext/oj/code.c +214 -0
- data/ext/oj/code.h +40 -0
- data/ext/oj/compat.c +194 -110
- data/ext/oj/custom.c +1074 -0
- data/ext/oj/debug.c +126 -0
- data/ext/oj/dump.c +1276 -2494
- data/ext/oj/dump.h +110 -0
- data/ext/oj/dump_compat.c +897 -0
- data/ext/oj/dump_leaf.c +162 -0
- data/ext/oj/dump_object.c +710 -0
- data/ext/oj/dump_strict.c +399 -0
- data/ext/oj/encode.h +7 -42
- data/ext/oj/encoder.c +43 -0
- data/ext/oj/err.c +28 -53
- data/ext/oj/err.h +49 -46
- data/ext/oj/extconf.rb +33 -32
- data/ext/oj/fast.c +1082 -1098
- data/ext/oj/intern.c +313 -0
- data/ext/oj/intern.h +22 -0
- data/ext/oj/mem.c +318 -0
- data/ext/oj/mem.h +53 -0
- data/ext/oj/mimic_json.c +919 -0
- data/ext/oj/object.c +545 -625
- data/ext/oj/odd.c +158 -168
- data/ext/oj/odd.h +32 -58
- data/ext/oj/oj.c +1727 -2080
- data/ext/oj/oj.h +334 -259
- data/ext/oj/parse.c +974 -753
- data/ext/oj/parse.h +97 -90
- data/ext/oj/parser.c +1600 -0
- data/ext/oj/parser.h +103 -0
- data/ext/oj/rails.c +1478 -0
- data/ext/oj/rails.h +18 -0
- data/ext/oj/reader.c +136 -163
- data/ext/oj/reader.h +76 -112
- data/ext/oj/resolve.c +45 -94
- data/ext/oj/resolve.h +7 -34
- data/ext/oj/rxclass.c +144 -0
- data/ext/oj/rxclass.h +26 -0
- data/ext/oj/saj.c +445 -511
- data/ext/oj/saj2.c +584 -0
- data/ext/oj/saj2.h +23 -0
- data/ext/oj/scp.c +82 -143
- data/ext/oj/simd.h +10 -0
- data/ext/oj/sparse.c +749 -644
- data/ext/oj/stream_writer.c +329 -0
- data/ext/oj/strict.c +114 -112
- data/ext/oj/string_writer.c +517 -0
- data/ext/oj/trace.c +72 -0
- data/ext/oj/trace.h +55 -0
- data/ext/oj/usual.c +1218 -0
- data/ext/oj/usual.h +69 -0
- data/ext/oj/util.c +136 -0
- data/ext/oj/util.h +20 -0
- data/ext/oj/val_stack.c +75 -72
- data/ext/oj/val_stack.h +94 -127
- data/ext/oj/validate.c +46 -0
- data/ext/oj/wab.c +586 -0
- data/lib/oj/active_support_helper.rb +1 -3
- data/lib/oj/bag.rb +8 -1
- data/lib/oj/easy_hash.rb +21 -13
- data/lib/oj/error.rb +10 -12
- data/lib/oj/json.rb +188 -0
- data/lib/oj/mimic.rb +165 -26
- data/lib/oj/saj.rb +20 -6
- data/lib/oj/schandler.rb +5 -4
- data/lib/oj/state.rb +135 -0
- data/lib/oj/version.rb +2 -3
- data/lib/oj.rb +3 -31
- data/pages/Advanced.md +22 -0
- data/pages/Compatibility.md +25 -0
- data/pages/Custom.md +23 -0
- data/pages/Encoding.md +65 -0
- data/pages/InstallOptions.md +20 -0
- data/pages/JsonGem.md +94 -0
- data/pages/Modes.md +161 -0
- data/pages/Options.md +337 -0
- data/pages/Parser.md +309 -0
- data/pages/Rails.md +167 -0
- data/pages/Security.md +20 -0
- data/pages/WAB.md +13 -0
- metadata +126 -163
- data/ext/oj/hash.c +0 -163
- data/ext/oj/hash.h +0 -46
- data/ext/oj/hash_test.c +0 -512
- data/test/_test_active.rb +0 -76
- data/test/_test_active_mimic.rb +0 -96
- data/test/_test_mimic_rails.rb +0 -126
- data/test/activesupport_datetime_test.rb +0 -23
- data/test/bug.rb +0 -51
- data/test/bug2.rb +0 -10
- data/test/bug3.rb +0 -46
- data/test/bug_fast.rb +0 -32
- data/test/bug_load.rb +0 -24
- data/test/crash.rb +0 -111
- data/test/curl/curl_oj.rb +0 -46
- data/test/curl/get_oj.rb +0 -24
- data/test/curl/just_curl.rb +0 -31
- data/test/curl/just_oj.rb +0 -51
- data/test/example.rb +0 -11
- data/test/files.rb +0 -29
- data/test/foo.rb +0 -24
- data/test/helper.rb +0 -27
- data/test/io.rb +0 -48
- data/test/isolated/shared.rb +0 -310
- data/test/isolated/test_mimic_after.rb +0 -13
- data/test/isolated/test_mimic_alone.rb +0 -12
- data/test/isolated/test_mimic_as_json.rb +0 -45
- data/test/isolated/test_mimic_before.rb +0 -13
- data/test/isolated/test_mimic_define.rb +0 -28
- data/test/isolated/test_mimic_rails_after.rb +0 -22
- data/test/isolated/test_mimic_rails_before.rb +0 -21
- data/test/isolated/test_mimic_rails_datetime.rb +0 -27
- data/test/isolated/test_mimic_redefine.rb +0 -15
- data/test/mod.rb +0 -16
- data/test/perf.rb +0 -107
- data/test/perf_compat.rb +0 -128
- data/test/perf_fast.rb +0 -164
- data/test/perf_file.rb +0 -64
- data/test/perf_object.rb +0 -138
- data/test/perf_saj.rb +0 -109
- data/test/perf_scp.rb +0 -151
- data/test/perf_simple.rb +0 -287
- data/test/perf_strict.rb +0 -128
- data/test/rails.rb +0 -50
- data/test/russian.rb +0 -18
- data/test/sample/change.rb +0 -14
- data/test/sample/dir.rb +0 -19
- data/test/sample/doc.rb +0 -36
- data/test/sample/file.rb +0 -48
- data/test/sample/group.rb +0 -16
- data/test/sample/hasprops.rb +0 -16
- data/test/sample/layer.rb +0 -12
- data/test/sample/line.rb +0 -20
- data/test/sample/oval.rb +0 -10
- data/test/sample/rect.rb +0 -10
- data/test/sample/shape.rb +0 -35
- data/test/sample/text.rb +0 -20
- data/test/sample.rb +0 -55
- data/test/sample_json.rb +0 -37
- data/test/struct.rb +0 -29
- data/test/test_compat.rb +0 -398
- data/test/test_debian.rb +0 -53
- data/test/test_fast.rb +0 -458
- data/test/test_file.rb +0 -245
- data/test/test_gc.rb +0 -49
- data/test/test_hash.rb +0 -29
- data/test/test_object.rb +0 -745
- data/test/test_saj.rb +0 -186
- data/test/test_scp.rb +0 -396
- data/test/test_serializer.rb +0 -59
- data/test/test_strict.rb +0 -254
- data/test/test_various.rb +0 -1383
- data/test/test_writer.rb +0 -308
- data/test/write_timebars.rb +0 -31
data/ext/oj/scp.c
CHANGED
@@ -1,246 +1,185 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* All rights reserved.
|
4
|
-
*
|
5
|
-
* Redistribution and use in source and binary forms, with or without
|
6
|
-
* modification, are permitted provided that the following conditions are met:
|
7
|
-
*
|
8
|
-
* - Redistributions of source code must retain the above copyright notice, this
|
9
|
-
* list of conditions and the following disclaimer.
|
10
|
-
*
|
11
|
-
* - Redistributions in binary form must reproduce the above copyright notice,
|
12
|
-
* this list of conditions and the following disclaimer in the documentation
|
13
|
-
* and/or other materials provided with the distribution.
|
14
|
-
*
|
15
|
-
* - Neither the name of Peter Ohler nor the names of its contributors may be
|
16
|
-
* used to endorse or promote products derived from this software without
|
17
|
-
* specific prior written permission.
|
18
|
-
*
|
19
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
20
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
21
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
23
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
24
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
25
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
26
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
27
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
*/
|
1
|
+
// Copyright (c) 2012 Peter Ohler. All rights reserved.
|
2
|
+
// Licensed under the MIT License. See LICENSE file in the project root for license details.
|
30
3
|
|
31
|
-
#include <
|
4
|
+
#include <math.h>
|
32
5
|
#include <stdio.h>
|
6
|
+
#include <stdlib.h>
|
33
7
|
#include <string.h>
|
34
|
-
#include <math.h>
|
35
8
|
#include <sys/types.h>
|
36
9
|
#include <unistd.h>
|
37
10
|
|
11
|
+
#include "encode.h"
|
12
|
+
#include "intern.h"
|
38
13
|
#include "oj.h"
|
39
14
|
#include "parse.h"
|
40
|
-
#include "encode.h"
|
41
15
|
|
42
|
-
static VALUE
|
43
|
-
noop_start(ParseInfo pi) {
|
16
|
+
static VALUE noop_start(ParseInfo pi) {
|
44
17
|
return Qnil;
|
45
18
|
}
|
46
19
|
|
47
|
-
static void
|
48
|
-
noop_end(ParseInfo pi) {
|
20
|
+
static void noop_end(ParseInfo pi) {
|
49
21
|
}
|
50
22
|
|
51
|
-
static void
|
52
|
-
noop_add_value(ParseInfo pi, VALUE val) {
|
23
|
+
static void noop_add_value(ParseInfo pi, VALUE val) {
|
53
24
|
}
|
54
25
|
|
55
|
-
static void
|
56
|
-
noop_add_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
26
|
+
static void noop_add_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
57
27
|
}
|
58
28
|
|
59
|
-
static void
|
60
|
-
noop_add_num(ParseInfo pi, NumInfo ni) {
|
29
|
+
static void noop_add_num(ParseInfo pi, NumInfo ni) {
|
61
30
|
}
|
62
31
|
|
63
|
-
static VALUE
|
64
|
-
noop_hash_key(struct _ParseInfo *pi, const char *key, size_t klen) {
|
32
|
+
static VALUE noop_hash_key(ParseInfo pi, const char *key, size_t klen) {
|
65
33
|
return Qundef;
|
66
34
|
}
|
67
35
|
|
68
|
-
static void
|
69
|
-
noop_hash_set_cstr(ParseInfo pi, Val kval, const char *str, size_t len, const char *orig) {
|
36
|
+
static void noop_hash_set_cstr(ParseInfo pi, Val kval, const char *str, size_t len, const char *orig) {
|
70
37
|
}
|
71
38
|
|
72
|
-
static void
|
73
|
-
noop_hash_set_num(ParseInfo pi, Val kval, NumInfo ni) {
|
39
|
+
static void noop_hash_set_num(ParseInfo pi, Val kval, NumInfo ni) {
|
74
40
|
}
|
75
41
|
|
76
|
-
static void
|
77
|
-
noop_hash_set_value(ParseInfo pi, Val kval, VALUE value) {
|
42
|
+
static void noop_hash_set_value(ParseInfo pi, Val kval, VALUE value) {
|
78
43
|
}
|
79
44
|
|
80
|
-
static void
|
81
|
-
noop_array_append_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
45
|
+
static void noop_array_append_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
82
46
|
}
|
83
47
|
|
84
|
-
static void
|
85
|
-
noop_array_append_num(ParseInfo pi, NumInfo ni) {
|
48
|
+
static void noop_array_append_num(ParseInfo pi, NumInfo ni) {
|
86
49
|
}
|
87
50
|
|
88
|
-
static void
|
89
|
-
noop_array_append_value(ParseInfo pi, VALUE value) {
|
51
|
+
static void noop_array_append_value(ParseInfo pi, VALUE value) {
|
90
52
|
}
|
91
53
|
|
92
|
-
static void
|
93
|
-
add_value(ParseInfo pi, VALUE val) {
|
54
|
+
static void add_value(ParseInfo pi, VALUE val) {
|
94
55
|
rb_funcall(pi->handler, oj_add_value_id, 1, val);
|
95
56
|
}
|
96
57
|
|
97
|
-
static void
|
98
|
-
|
99
|
-
volatile VALUE rstr = rb_str_new(str, len);
|
58
|
+
static void add_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
59
|
+
volatile VALUE rstr = rb_utf8_str_new(str, len);
|
100
60
|
|
101
|
-
rstr = oj_encode(rstr);
|
102
61
|
rb_funcall(pi->handler, oj_add_value_id, 1, rstr);
|
103
62
|
}
|
104
63
|
|
105
|
-
static void
|
106
|
-
add_num(ParseInfo pi, NumInfo ni) {
|
64
|
+
static void add_num(ParseInfo pi, NumInfo ni) {
|
107
65
|
rb_funcall(pi->handler, oj_add_value_id, 1, oj_num_as_value(ni));
|
108
66
|
}
|
109
67
|
|
110
|
-
static VALUE
|
111
|
-
start_hash(ParseInfo pi) {
|
68
|
+
static VALUE start_hash(ParseInfo pi) {
|
112
69
|
return rb_funcall(pi->handler, oj_hash_start_id, 0);
|
113
70
|
}
|
114
71
|
|
115
|
-
static void
|
116
|
-
end_hash(ParseInfo pi) {
|
72
|
+
static void end_hash(ParseInfo pi) {
|
117
73
|
rb_funcall(pi->handler, oj_hash_end_id, 0);
|
118
74
|
}
|
119
75
|
|
120
|
-
static VALUE
|
121
|
-
start_array(ParseInfo pi) {
|
76
|
+
static VALUE start_array(ParseInfo pi) {
|
122
77
|
return rb_funcall(pi->handler, oj_array_start_id, 0);
|
123
78
|
}
|
124
79
|
|
125
|
-
static void
|
126
|
-
end_array(ParseInfo pi) {
|
80
|
+
static void end_array(ParseInfo pi) {
|
127
81
|
rb_funcall(pi->handler, oj_array_end_id, 0);
|
128
82
|
}
|
129
83
|
|
130
|
-
static VALUE
|
131
|
-
calc_hash_key(ParseInfo pi, Val kval) {
|
132
|
-
volatile VALUE rkey = kval->key_val;
|
133
|
-
|
134
|
-
if (Qundef == rkey) {
|
135
|
-
rkey = rb_str_new(kval->key, kval->klen);
|
136
|
-
rkey = oj_encode(rkey);
|
137
|
-
if (Yes == pi->options.sym_key) {
|
138
|
-
rkey = rb_str_intern(rkey);
|
139
|
-
}
|
140
|
-
}
|
141
|
-
return rkey;
|
142
|
-
}
|
143
|
-
|
144
|
-
static VALUE
|
145
|
-
hash_key(struct _ParseInfo *pi, const char *key, size_t klen) {
|
84
|
+
static VALUE hash_key(ParseInfo pi, const char *key, size_t klen) {
|
146
85
|
return rb_funcall(pi->handler, oj_hash_key_id, 1, rb_str_new(key, klen));
|
147
86
|
}
|
148
87
|
|
149
|
-
static void
|
150
|
-
|
151
|
-
volatile VALUE rstr = rb_str_new(str, len);
|
88
|
+
static void hash_set_cstr(ParseInfo pi, Val kval, const char *str, size_t len, const char *orig) {
|
89
|
+
volatile VALUE rstr = rb_utf8_str_new(str, len);
|
152
90
|
|
153
|
-
|
154
|
-
rb_funcall(pi->handler, oj_hash_set_id, 3, stack_peek(&pi->stack)->val, calc_hash_key(pi, kval), rstr);
|
91
|
+
rb_funcall(pi->handler, oj_hash_set_id, 3, stack_peek(&pi->stack)->val, oj_calc_hash_key(pi, kval), rstr);
|
155
92
|
}
|
156
93
|
|
157
|
-
static void
|
158
|
-
|
159
|
-
|
94
|
+
static void hash_set_num(ParseInfo pi, Val kval, NumInfo ni) {
|
95
|
+
rb_funcall(pi->handler,
|
96
|
+
oj_hash_set_id,
|
97
|
+
3,
|
98
|
+
stack_peek(&pi->stack)->val,
|
99
|
+
oj_calc_hash_key(pi, kval),
|
100
|
+
oj_num_as_value(ni));
|
160
101
|
}
|
161
102
|
|
162
|
-
static void
|
163
|
-
|
164
|
-
rb_funcall(pi->handler, oj_hash_set_id, 3, stack_peek(&pi->stack)->val, calc_hash_key(pi, kval), value);
|
103
|
+
static void hash_set_value(ParseInfo pi, Val kval, VALUE value) {
|
104
|
+
rb_funcall(pi->handler, oj_hash_set_id, 3, stack_peek(&pi->stack)->val, oj_calc_hash_key(pi, kval), value);
|
165
105
|
}
|
166
106
|
|
167
|
-
static void
|
168
|
-
|
169
|
-
volatile VALUE rstr = rb_str_new(str, len);
|
107
|
+
static void array_append_cstr(ParseInfo pi, const char *str, size_t len, const char *orig) {
|
108
|
+
volatile VALUE rstr = rb_utf8_str_new(str, len);
|
170
109
|
|
171
|
-
rstr = oj_encode(rstr);
|
172
110
|
rb_funcall(pi->handler, oj_array_append_id, 2, stack_peek(&pi->stack)->val, rstr);
|
173
111
|
}
|
174
112
|
|
175
|
-
static void
|
176
|
-
array_append_num(ParseInfo pi, NumInfo ni) {
|
113
|
+
static void array_append_num(ParseInfo pi, NumInfo ni) {
|
177
114
|
rb_funcall(pi->handler, oj_array_append_id, 2, stack_peek(&pi->stack)->val, oj_num_as_value(ni));
|
178
115
|
}
|
179
116
|
|
180
|
-
static void
|
181
|
-
array_append_value(ParseInfo pi, VALUE value) {
|
117
|
+
static void array_append_value(ParseInfo pi, VALUE value) {
|
182
118
|
rb_funcall(pi->handler, oj_array_append_id, 2, stack_peek(&pi->stack)->val, value);
|
183
119
|
}
|
184
120
|
|
185
121
|
VALUE
|
186
122
|
oj_sc_parse(int argc, VALUE *argv, VALUE self) {
|
187
|
-
struct
|
188
|
-
VALUE
|
123
|
+
struct _parseInfo pi;
|
124
|
+
VALUE input = argv[1];
|
189
125
|
|
126
|
+
parse_info_init(&pi);
|
190
127
|
pi.err_class = Qnil;
|
191
|
-
pi.
|
128
|
+
pi.max_depth = 0;
|
129
|
+
pi.options = oj_default_options;
|
192
130
|
if (3 == argc) {
|
193
|
-
|
131
|
+
oj_parse_options(argv[2], &pi.options);
|
194
132
|
}
|
195
133
|
if (rb_block_given_p()) {
|
196
|
-
|
134
|
+
pi.proc = Qnil;
|
197
135
|
} else {
|
198
|
-
|
136
|
+
pi.proc = Qundef;
|
199
137
|
}
|
200
138
|
pi.handler = *argv;
|
201
139
|
|
202
|
-
pi.start_hash
|
203
|
-
pi.end_hash
|
204
|
-
pi.hash_key
|
140
|
+
pi.start_hash = rb_respond_to(pi.handler, oj_hash_start_id) ? start_hash : noop_start;
|
141
|
+
pi.end_hash = rb_respond_to(pi.handler, oj_hash_end_id) ? end_hash : noop_end;
|
142
|
+
pi.hash_key = rb_respond_to(pi.handler, oj_hash_key_id) ? hash_key : noop_hash_key;
|
205
143
|
pi.start_array = rb_respond_to(pi.handler, oj_array_start_id) ? start_array : noop_start;
|
206
|
-
pi.end_array
|
144
|
+
pi.end_array = rb_respond_to(pi.handler, oj_array_end_id) ? end_array : noop_end;
|
207
145
|
if (rb_respond_to(pi.handler, oj_hash_set_id)) {
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
146
|
+
pi.hash_set_value = hash_set_value;
|
147
|
+
pi.hash_set_cstr = hash_set_cstr;
|
148
|
+
pi.hash_set_num = hash_set_num;
|
149
|
+
pi.expect_value = 1;
|
212
150
|
} else {
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
151
|
+
pi.hash_set_value = noop_hash_set_value;
|
152
|
+
pi.hash_set_cstr = noop_hash_set_cstr;
|
153
|
+
pi.hash_set_num = noop_hash_set_num;
|
154
|
+
pi.expect_value = 0;
|
217
155
|
}
|
218
156
|
if (rb_respond_to(pi.handler, oj_array_append_id)) {
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
157
|
+
pi.array_append_value = array_append_value;
|
158
|
+
pi.array_append_cstr = array_append_cstr;
|
159
|
+
pi.array_append_num = array_append_num;
|
160
|
+
pi.expect_value = 1;
|
223
161
|
} else {
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
162
|
+
pi.array_append_value = noop_array_append_value;
|
163
|
+
pi.array_append_cstr = noop_array_append_cstr;
|
164
|
+
pi.array_append_num = noop_array_append_num;
|
165
|
+
pi.expect_value = 0;
|
228
166
|
}
|
229
167
|
if (rb_respond_to(pi.handler, oj_add_value_id)) {
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
168
|
+
pi.add_cstr = add_cstr;
|
169
|
+
pi.add_num = add_num;
|
170
|
+
pi.add_value = add_value;
|
171
|
+
pi.expect_value = 1;
|
234
172
|
} else {
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
173
|
+
pi.add_cstr = noop_add_cstr;
|
174
|
+
pi.add_num = noop_add_num;
|
175
|
+
pi.add_value = noop_add_value;
|
176
|
+
pi.expect_value = 0;
|
239
177
|
}
|
178
|
+
pi.has_callbacks = true;
|
240
179
|
|
241
180
|
if (T_STRING == rb_type(input)) {
|
242
|
-
|
181
|
+
return oj_pi_parse(argc - 1, argv + 1, &pi, 0, 0, 1);
|
243
182
|
} else {
|
244
|
-
|
183
|
+
return oj_pi_sparse(argc - 1, argv + 1, &pi, 0);
|
245
184
|
}
|
246
185
|
}
|
data/ext/oj/simd.h
ADDED