brianmario-yajl-ruby 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/VERSION.yml +1 -1
- data/ext/yajl.c +4 -4
- metadata +2 -1
data/CHANGELOG.rdoc
CHANGED
data/VERSION.yml
CHANGED
data/ext/yajl.c
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
static VALUE cParseError;
|
6
6
|
|
7
7
|
void set_static_value(void * ctx, VALUE val) {
|
8
|
-
VALUE len =
|
8
|
+
VALUE len = RARRAY_LEN((VALUE)ctx);
|
9
9
|
|
10
10
|
if (len > 0) {
|
11
11
|
VALUE lastEntry = rb_ary_entry((VALUE)ctx, len-1);
|
@@ -68,7 +68,7 @@ static int found_start_hash(void * ctx) {
|
|
68
68
|
}
|
69
69
|
|
70
70
|
static int found_end_hash(void * ctx) {
|
71
|
-
if (
|
71
|
+
if (RARRAY_LEN((VALUE)ctx) > 1) {
|
72
72
|
rb_ary_pop((VALUE)ctx);
|
73
73
|
}
|
74
74
|
return 1;
|
@@ -80,7 +80,7 @@ static int found_start_array(void * ctx) {
|
|
80
80
|
}
|
81
81
|
|
82
82
|
static int found_end_array(void * ctx) {
|
83
|
-
if (
|
83
|
+
if (RARRAY_LEN((VALUE)ctx) > 1) {
|
84
84
|
rb_ary_pop((VALUE)ctx);
|
85
85
|
}
|
86
86
|
return 1;
|
@@ -120,7 +120,7 @@ static VALUE t_parse(VALUE self, VALUE io) {
|
|
120
120
|
while (rb_funcall(io, intern_eof, 0) == Qfalse) {
|
121
121
|
rb_funcall(io, intern_io_read, 2, rbufsize, parsed);
|
122
122
|
|
123
|
-
stat = yajl_parse(hand, (const unsigned char *)
|
123
|
+
stat = yajl_parse(hand, (const unsigned char *)RSTRING_PTR(parsed), RSTRING_LEN(parsed));
|
124
124
|
|
125
125
|
if (stat != yajl_status_ok && stat != yajl_status_insufficient_data) {
|
126
126
|
unsigned char * str = yajl_get_error(hand, 1, (const unsigned char *)RSTRING_PTR(parsed), RSTRING_LEN(parsed));
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brianmario-yajl-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
@@ -20,6 +20,7 @@ executables: []
|
|
20
20
|
extensions:
|
21
21
|
- ext/extconf.rb
|
22
22
|
extra_rdoc_files:
|
23
|
+
- CHANGELOG.rdoc
|
23
24
|
- README.rdoc
|
24
25
|
files:
|
25
26
|
- CHANGELOG.rdoc
|