ffi-yajl 0.0.1-universal-java → 0.0.2-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/ext/ffi_yajl/ext/encoder/encoder.bundle +0 -0
- data/ext/ffi_yajl/ext/encoder/encoder.c +13 -1
- data/ext/ffi_yajl/ext/encoder/encoder.o +0 -0
- data/ext/ffi_yajl/ext/parser/parser.bundle +0 -0
- data/ext/ffi_yajl/ext/parser/parser.o +0 -0
- data/ext/libyajl2/extconf.rb +0 -5
- data/ext/libyajl2/mkmf.log +63 -0
- data/lib/ffi_yajl/ffi/encoder.rb +9 -0
- data/lib/ffi_yajl/version.rb +1 -1
- data/lib/libyajl.2.0.1.dylib +0 -0
- data/lib/libyajl.2.dylib +0 -0
- data/lib/libyajl.dylib +0 -0
- data/lib/libyajl_s.a +0 -0
- data/spec/ffi_yajl/encoder_spec.rb +10 -0
- metadata +10 -171
- data/ext/libyajl2/vendored/.gitignore +0 -3
- data/ext/libyajl2/vendored/BUILDING +0 -23
- data/ext/libyajl2/vendored/BUILDING.win32 +0 -27
- data/ext/libyajl2/vendored/CMakeLists.txt +0 -79
- data/ext/libyajl2/vendored/COPYING +0 -13
- data/ext/libyajl2/vendored/ChangeLog +0 -175
- data/ext/libyajl2/vendored/README +0 -74
- data/ext/libyajl2/vendored/TODO +0 -9
- data/ext/libyajl2/vendored/YAJLDoc.cmake +0 -26
- data/ext/libyajl2/vendored/configure +0 -79
- data/ext/libyajl2/vendored/example/CMakeLists.txt +0 -23
- data/ext/libyajl2/vendored/example/README.md +0 -7
- data/ext/libyajl2/vendored/example/parse_config.c +0 -69
- data/ext/libyajl2/vendored/example/sample.config +0 -101
- data/ext/libyajl2/vendored/perf/CMakeLists.txt +0 -23
- data/ext/libyajl2/vendored/perf/documents.c +0 -1418
- data/ext/libyajl2/vendored/perf/documents.h +0 -28
- data/ext/libyajl2/vendored/perf/perftest.c +0 -134
- data/ext/libyajl2/vendored/reformatter/CMakeLists.txt +0 -39
- data/ext/libyajl2/vendored/reformatter/json_reformat.c +0 -194
- data/ext/libyajl2/vendored/src/CMakeLists.txt +0 -86
- data/ext/libyajl2/vendored/src/YAJL.dxy +0 -1258
- data/ext/libyajl2/vendored/src/api/yajl_common.h +0 -75
- data/ext/libyajl2/vendored/src/api/yajl_gen.h +0 -157
- data/ext/libyajl2/vendored/src/api/yajl_parse.h +0 -226
- data/ext/libyajl2/vendored/src/api/yajl_tree.h +0 -185
- data/ext/libyajl2/vendored/src/api/yajl_version.h.cmake +0 -23
- data/ext/libyajl2/vendored/src/yajl +0 -33
- data/ext/libyajl2/vendored/src/yajl.c +0 -175
- data/ext/libyajl2/vendored/src/yajl.pc.cmake +0 -9
- data/ext/libyajl2/vendored/src/yajl_alloc.c +0 -52
- data/ext/libyajl2/vendored/src/yajl_alloc.h +0 -34
- data/ext/libyajl2/vendored/src/yajl_buf.c +0 -103
- data/ext/libyajl2/vendored/src/yajl_buf.h +0 -57
- data/ext/libyajl2/vendored/src/yajl_bytestack.h +0 -69
- data/ext/libyajl2/vendored/src/yajl_encode.c +0 -220
- data/ext/libyajl2/vendored/src/yajl_encode.h +0 -34
- data/ext/libyajl2/vendored/src/yajl_gen.c +0 -354
- data/ext/libyajl2/vendored/src/yajl_lex.c +0 -763
- data/ext/libyajl2/vendored/src/yajl_lex.h +0 -117
- data/ext/libyajl2/vendored/src/yajl_parser.c +0 -498
- data/ext/libyajl2/vendored/src/yajl_parser.h +0 -78
- data/ext/libyajl2/vendored/src/yajl_tree.c +0 -503
- data/ext/libyajl2/vendored/src/yajl_version.c +0 -7
- data/ext/libyajl2/vendored/test/CMakeLists.txt +0 -23
- data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json.gold +0 -36
- data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json +0 -11
- data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json.gold +0 -9
- data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/am_eof.json +0 -1
- data/ext/libyajl2/vendored/test/cases/am_eof.json.gold +0 -4
- data/ext/libyajl2/vendored/test/cases/am_integers.json +0 -1
- data/ext/libyajl2/vendored/test/cases/am_integers.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/am_multiple.json +0 -3
- data/ext/libyajl2/vendored/test/cases/am_multiple.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/am_stuff.json +0 -7
- data/ext/libyajl2/vendored/test/cases/am_stuff.json.gold +0 -14
- data/ext/libyajl2/vendored/test/cases/ap_array_open.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ap_array_open.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/ap_eof_str.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ap_eof_str.json.gold +0 -1
- data/ext/libyajl2/vendored/test/cases/ap_map_open.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ap_map_open.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json +0 -1
- data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json.gold +0 -4
- data/ext/libyajl2/vendored/test/cases/array.json +0 -6
- data/ext/libyajl2/vendored/test/cases/array.json.gold +0 -22
- data/ext/libyajl2/vendored/test/cases/array_close.json +0 -1
- data/ext/libyajl2/vendored/test/cases/array_close.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/bignums.json +0 -1
- data/ext/libyajl2/vendored/test/cases/bignums.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/bogus_char.json +0 -4
- data/ext/libyajl2/vendored/test/cases/bogus_char.json.gold +0 -10
- data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json +0 -1
- data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/deep_arrays.json +0 -1
- data/ext/libyajl2/vendored/test/cases/deep_arrays.json.gold +0 -2049
- data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json +0 -1
- data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json.gold +0 -36
- data/ext/libyajl2/vendored/test/cases/doubles.json +0 -1
- data/ext/libyajl2/vendored/test/cases/doubles.json.gold +0 -7
- data/ext/libyajl2/vendored/test/cases/doubles_in_array.json +0 -1
- data/ext/libyajl2/vendored/test/cases/doubles_in_array.json.gold +0 -8
- data/ext/libyajl2/vendored/test/cases/empty_array.json +0 -1
- data/ext/libyajl2/vendored/test/cases/empty_array.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/empty_string.json +0 -1
- data/ext/libyajl2/vendored/test/cases/empty_string.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json +0 -4
- data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json.gold +0 -7
- data/ext/libyajl2/vendored/test/cases/escaped_foobar.json +0 -1
- data/ext/libyajl2/vendored/test/cases/escaped_foobar.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/false.json +0 -1
- data/ext/libyajl2/vendored/test/cases/false.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/fg_issue_7.json +0 -1
- data/ext/libyajl2/vendored/test/cases/fg_issue_7.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json +0 -1
- data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json +0 -2
- data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/high_overflow.json +0 -1
- data/ext/libyajl2/vendored/test/cases/high_overflow.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/integers.json +0 -3
- data/ext/libyajl2/vendored/test/cases/integers.json.gold +0 -14
- data/ext/libyajl2/vendored/test/cases/invalid_utf8.json +0 -1
- data/ext/libyajl2/vendored/test/cases/invalid_utf8.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json +0 -1
- data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json +0 -1
- data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json +0 -7
- data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json.gold +0 -9
- data/ext/libyajl2/vendored/test/cases/lonely_number.json +0 -1
- data/ext/libyajl2/vendored/test/cases/lonely_number.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/low_overflow.json +0 -1
- data/ext/libyajl2/vendored/test/cases/low_overflow.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/map_close.json +0 -1
- data/ext/libyajl2/vendored/test/cases/map_close.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json +0 -1
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json +0 -1
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/multiple.json +0 -3
- data/ext/libyajl2/vendored/test/cases/multiple.json.gold +0 -4
- data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json +0 -1
- data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json.gold +0 -8
- data/ext/libyajl2/vendored/test/cases/np_partial_bad.json +0 -1
- data/ext/libyajl2/vendored/test/cases/np_partial_bad.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/null.json +0 -1
- data/ext/libyajl2/vendored/test/cases/null.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json +0 -5
- data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json.gold +0 -9
- data/ext/libyajl2/vendored/test/cases/simple.json +0 -5
- data/ext/libyajl2/vendored/test/cases/simple.json.gold +0 -9
- data/ext/libyajl2/vendored/test/cases/simple_with_comments.json +0 -11
- data/ext/libyajl2/vendored/test/cases/simple_with_comments.json.gold +0 -5
- data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json +0 -1
- data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json.gold +0 -3
- data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json +0 -1
- data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/string_with_escapes.json +0 -3
- data/ext/libyajl2/vendored/test/cases/string_with_escapes.json.gold +0 -7
- data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json +0 -2
- data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json +0 -1
- data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json.gold +0 -7
- data/ext/libyajl2/vendored/test/cases/true.json +0 -1
- data/ext/libyajl2/vendored/test/cases/true.json.gold +0 -2
- data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json +0 -1
- data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json.gold +0 -4
- data/ext/libyajl2/vendored/test/cases/zerobyte.json +0 -1
- data/ext/libyajl2/vendored/test/cases/zerobyte.json.gold +0 -0
- data/ext/libyajl2/vendored/test/run_tests.sh +0 -94
- data/ext/libyajl2/vendored/test/yajl_test.c +0 -281
- data/ext/libyajl2/vendored/verify/CMakeLists.txt +0 -39
- data/ext/libyajl2/vendored/verify/json_verify.c +0 -116
- data/lib/libyajl.so +0 -0
- data/lib/libyajl.so.2 +0 -0
- data/lib/libyajl.so.2.0.5 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82a3a5ac433463f78e468ed4f6f12d57047e847
|
4
|
+
data.tar.gz: ac9aa998c59d3e92ea1b69a2eb2dc8370c189deb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b802c373b6b67a0388510095a47ee937c9b040646f17895e87138d5ddca85a9a8c18f6c3d552bbfebeaa7b6c44c570e7ec61be62dccedef008cc5bda16d4ca18
|
7
|
+
data.tar.gz: 51ab0c3759c595ed85df07141a729edaa96c8d63f7bf016aa5c1cd2f7cf5e7e74de91d43419ae1872b2970e84e320d466654da2ef1db76c1af06767d663105c2
|
data/README.md
CHANGED
Binary file
|
@@ -197,7 +197,6 @@ static VALUE rb_cFloat_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) {
|
|
197
197
|
return Qnil;
|
198
198
|
}
|
199
199
|
|
200
|
-
|
201
200
|
static VALUE rb_cString_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) {
|
202
201
|
yajl_gen_status status;
|
203
202
|
CHECK_STATUS(
|
@@ -206,6 +205,18 @@ static VALUE rb_cString_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) {
|
|
206
205
|
return Qnil;
|
207
206
|
}
|
208
207
|
|
208
|
+
static VALUE rb_cSymbol_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) {
|
209
|
+
yajl_gen_status status;
|
210
|
+
ID sym_to_s = rb_intern("to_s");
|
211
|
+
VALUE str = rb_funcall(self, sym_to_s, 0);
|
212
|
+
char *cptr = RSTRING_PTR(str);
|
213
|
+
int len = RSTRING_LEN(str);
|
214
|
+
CHECK_STATUS(
|
215
|
+
yajl_gen_string((struct yajl_gen_t *) yajl_gen, (unsigned char *)cptr, len)
|
216
|
+
);
|
217
|
+
return Qnil;
|
218
|
+
}
|
219
|
+
|
209
220
|
static VALUE rb_cObject_ffi_yajl(VALUE self, VALUE yajl_gen, VALUE state) {
|
210
221
|
yajl_gen_status status;
|
211
222
|
ID sym_to_json = rb_intern("to_json");
|
@@ -235,6 +246,7 @@ void Init_encoder() {
|
|
235
246
|
rb_define_method(rb_cBignum, "ffi_yajl", rb_cBignum_ffi_yajl, 2);
|
236
247
|
rb_define_method(rb_cFloat, "ffi_yajl", rb_cFloat_ffi_yajl, 2);
|
237
248
|
rb_define_method(rb_cString, "ffi_yajl", rb_cString_ffi_yajl, 2);
|
249
|
+
rb_define_method(rb_cSymbol, "ffi_yajl", rb_cSymbol_ffi_yajl, 2);
|
238
250
|
rb_define_method(rb_cObject, "ffi_yajl", rb_cObject_ffi_yajl, 2);
|
239
251
|
}
|
240
252
|
|
Binary file
|
Binary file
|
Binary file
|
data/ext/libyajl2/extconf.rb
CHANGED
@@ -44,11 +44,6 @@ else
|
|
44
44
|
ENV['CFLAGS'] = cflags
|
45
45
|
ENV['LDFLAGS'] = ldflags
|
46
46
|
ENV['CC'] = cc
|
47
|
-
unless File.exists?("vendored")
|
48
|
-
system("pwd")
|
49
|
-
puts "FOOOOOOOO: #{__FILE__}"
|
50
|
-
system("ls -lad #{File.expand_path(File.join(File.dirname(__FILE__), "vendored"))}")
|
51
|
-
end
|
52
47
|
system("cp -rf #{File.expand_path(File.join(File.dirname(__FILE__), "vendored"))} .") unless File.exists?("vendored")
|
53
48
|
|
54
49
|
File.open("Makefile", "w") do |mf|
|
@@ -0,0 +1,63 @@
|
|
1
|
+
have_library: checking for yajl_complete_parse() in -lyajl... -------------------- no
|
2
|
+
|
3
|
+
"/usr/bin/clang -o conftest -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -march=nocona -O2 -pipe -fno-common -Wall conftest.c -L. -L/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.2.0.0 -lpthread -ldl -lobjc "
|
4
|
+
checked program was:
|
5
|
+
/* begin */
|
6
|
+
1: #include "ruby.h"
|
7
|
+
2:
|
8
|
+
3: int main(int argc, char **argv)
|
9
|
+
4: {
|
10
|
+
5: return 0;
|
11
|
+
6: }
|
12
|
+
/* end */
|
13
|
+
|
14
|
+
"/usr/bin/clang -o conftest -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -march=nocona -O2 -pipe -fno-common -Wall conftest.c -L. -L/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.2.0.0 -lyajl -lpthread -ldl -lobjc "
|
15
|
+
conftest.c:3:10: fatal error: 'yajl/yajl_parse.h' file not found
|
16
|
+
#include <yajl/yajl_parse.h>
|
17
|
+
^
|
18
|
+
1 error generated.
|
19
|
+
checked program was:
|
20
|
+
/* begin */
|
21
|
+
1: #include "ruby.h"
|
22
|
+
2:
|
23
|
+
3: #include <yajl/yajl_parse.h>
|
24
|
+
4:
|
25
|
+
5: /*top*/
|
26
|
+
6: extern int t(void);
|
27
|
+
7: int t(void) { void ((*volatile p)()); p = (void ((*)()))yajl_complete_parse; return 0; }
|
28
|
+
8: int main(int argc, char **argv)
|
29
|
+
9: {
|
30
|
+
10: if (argc > 1000000) {
|
31
|
+
11: printf("%p", &t);
|
32
|
+
12: }
|
33
|
+
13:
|
34
|
+
14: return 0;
|
35
|
+
15: }
|
36
|
+
/* end */
|
37
|
+
|
38
|
+
"/usr/bin/clang -o conftest -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl/include -O3 -march=nocona -O2 -pipe -fno-common -Wall conftest.c -L. -L/Users/lamont/.rvm/rubies/ruby-2.0.0-p247/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl/lib -lruby.2.0.0 -lyajl -lpthread -ldl -lobjc "
|
39
|
+
conftest.c:3:10: fatal error: 'yajl/yajl_parse.h' file not found
|
40
|
+
#include <yajl/yajl_parse.h>
|
41
|
+
^
|
42
|
+
1 error generated.
|
43
|
+
checked program was:
|
44
|
+
/* begin */
|
45
|
+
1: #include "ruby.h"
|
46
|
+
2:
|
47
|
+
3: #include <yajl/yajl_parse.h>
|
48
|
+
4:
|
49
|
+
5: /*top*/
|
50
|
+
6: extern int t(void);
|
51
|
+
7: int t(void) { yajl_complete_parse(); return 0; }
|
52
|
+
8: int main(int argc, char **argv)
|
53
|
+
9: {
|
54
|
+
10: if (argc > 1000000) {
|
55
|
+
11: printf("%p", &t);
|
56
|
+
12: }
|
57
|
+
13:
|
58
|
+
14: return 0;
|
59
|
+
15: }
|
60
|
+
/* end */
|
61
|
+
|
62
|
+
--------------------
|
63
|
+
|
data/lib/ffi_yajl/ffi/encoder.rb
CHANGED
@@ -155,6 +155,15 @@ class Float
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
+
class Symbol
|
159
|
+
def ffi_yajl(yajl_gen, state)
|
160
|
+
str = self.to_s
|
161
|
+
if ( status = FFI_Yajl.yajl_gen_string(yajl_gen, str, str.bytesize) ) != 0
|
162
|
+
FFI_Yajl::Encoder.raise_error_for_status(status)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
158
167
|
class String
|
159
168
|
def ffi_yajl(yajl_gen, state)
|
160
169
|
if ( status = FFI_Yajl.yajl_gen_string(yajl_gen, self, self.bytesize) ) != 0
|
data/lib/ffi_yajl/version.rb
CHANGED
Binary file
|
data/lib/libyajl.2.dylib
ADDED
Binary file
|
data/lib/libyajl.dylib
ADDED
Binary file
|
data/lib/libyajl_s.a
CHANGED
Binary file
|
@@ -35,5 +35,15 @@ describe "FFI_Yajl::Encoder" do
|
|
35
35
|
127.times {|_| a["a"] = {}; a = a["a"] }
|
36
36
|
expect{ encoder.encode(root) }.to raise_error(FFI_Yajl::EncodeError)
|
37
37
|
end
|
38
|
+
|
39
|
+
it "encodes symbols in keys as strings" do
|
40
|
+
ruby = {:thing => 1}
|
41
|
+
expect(encoder.encode(ruby)).to eq('{"thing":1}')
|
42
|
+
end
|
43
|
+
|
44
|
+
it "encodes symbols in values as strings" do
|
45
|
+
ruby = {"thing" => :one}
|
46
|
+
expect(encoder.encode(ruby)).to eq('{"thing":"one"}')
|
47
|
+
end
|
38
48
|
end
|
39
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-yajl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: universal-java
|
6
6
|
authors:
|
7
7
|
- Lamont Granquist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -94,177 +94,16 @@ files:
|
|
94
94
|
- README.md
|
95
95
|
- Rakefile
|
96
96
|
- bin/ffi-yajl-bench
|
97
|
+
- ext/ffi_yajl/ext/encoder/encoder.bundle
|
97
98
|
- ext/ffi_yajl/ext/encoder/encoder.c
|
99
|
+
- ext/ffi_yajl/ext/encoder/encoder.o
|
98
100
|
- ext/ffi_yajl/ext/encoder/extconf.rb
|
99
101
|
- ext/ffi_yajl/ext/parser/extconf.rb
|
102
|
+
- ext/ffi_yajl/ext/parser/parser.bundle
|
100
103
|
- ext/ffi_yajl/ext/parser/parser.c
|
104
|
+
- ext/ffi_yajl/ext/parser/parser.o
|
101
105
|
- ext/libyajl2/extconf.rb
|
102
|
-
- ext/libyajl2/
|
103
|
-
- ext/libyajl2/vendored/.gitignore
|
104
|
-
- ext/libyajl2/vendored/BUILDING
|
105
|
-
- ext/libyajl2/vendored/BUILDING.win32
|
106
|
-
- ext/libyajl2/vendored/CMakeLists.txt
|
107
|
-
- ext/libyajl2/vendored/COPYING
|
108
|
-
- ext/libyajl2/vendored/ChangeLog
|
109
|
-
- ext/libyajl2/vendored/README
|
110
|
-
- ext/libyajl2/vendored/TODO
|
111
|
-
- ext/libyajl2/vendored/YAJLDoc.cmake
|
112
|
-
- ext/libyajl2/vendored/configure
|
113
|
-
- ext/libyajl2/vendored/example/CMakeLists.txt
|
114
|
-
- ext/libyajl2/vendored/example/README.md
|
115
|
-
- ext/libyajl2/vendored/example/parse_config.c
|
116
|
-
- ext/libyajl2/vendored/example/sample.config
|
117
|
-
- ext/libyajl2/vendored/perf/CMakeLists.txt
|
118
|
-
- ext/libyajl2/vendored/perf/documents.c
|
119
|
-
- ext/libyajl2/vendored/perf/documents.h
|
120
|
-
- ext/libyajl2/vendored/perf/perftest.c
|
121
|
-
- ext/libyajl2/vendored/reformatter/CMakeLists.txt
|
122
|
-
- ext/libyajl2/vendored/reformatter/json_reformat.c
|
123
|
-
- ext/libyajl2/vendored/src/CMakeLists.txt
|
124
|
-
- ext/libyajl2/vendored/src/YAJL.dxy
|
125
|
-
- ext/libyajl2/vendored/src/api/yajl_common.h
|
126
|
-
- ext/libyajl2/vendored/src/api/yajl_gen.h
|
127
|
-
- ext/libyajl2/vendored/src/api/yajl_parse.h
|
128
|
-
- ext/libyajl2/vendored/src/api/yajl_tree.h
|
129
|
-
- ext/libyajl2/vendored/src/api/yajl_version.h.cmake
|
130
|
-
- ext/libyajl2/vendored/src/yajl
|
131
|
-
- ext/libyajl2/vendored/src/yajl.c
|
132
|
-
- ext/libyajl2/vendored/src/yajl.pc.cmake
|
133
|
-
- ext/libyajl2/vendored/src/yajl_alloc.c
|
134
|
-
- ext/libyajl2/vendored/src/yajl_alloc.h
|
135
|
-
- ext/libyajl2/vendored/src/yajl_buf.c
|
136
|
-
- ext/libyajl2/vendored/src/yajl_buf.h
|
137
|
-
- ext/libyajl2/vendored/src/yajl_bytestack.h
|
138
|
-
- ext/libyajl2/vendored/src/yajl_encode.c
|
139
|
-
- ext/libyajl2/vendored/src/yajl_encode.h
|
140
|
-
- ext/libyajl2/vendored/src/yajl_gen.c
|
141
|
-
- ext/libyajl2/vendored/src/yajl_lex.c
|
142
|
-
- ext/libyajl2/vendored/src/yajl_lex.h
|
143
|
-
- ext/libyajl2/vendored/src/yajl_parser.c
|
144
|
-
- ext/libyajl2/vendored/src/yajl_parser.h
|
145
|
-
- ext/libyajl2/vendored/src/yajl_tree.c
|
146
|
-
- ext/libyajl2/vendored/src/yajl_version.c
|
147
|
-
- ext/libyajl2/vendored/test/CMakeLists.txt
|
148
|
-
- ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json
|
149
|
-
- ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json.gold
|
150
|
-
- ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json
|
151
|
-
- ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json.gold
|
152
|
-
- ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json
|
153
|
-
- ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json.gold
|
154
|
-
- ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json
|
155
|
-
- ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json.gold
|
156
|
-
- ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json
|
157
|
-
- ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json.gold
|
158
|
-
- ext/libyajl2/vendored/test/cases/am_eof.json
|
159
|
-
- ext/libyajl2/vendored/test/cases/am_eof.json.gold
|
160
|
-
- ext/libyajl2/vendored/test/cases/am_integers.json
|
161
|
-
- ext/libyajl2/vendored/test/cases/am_integers.json.gold
|
162
|
-
- ext/libyajl2/vendored/test/cases/am_multiple.json
|
163
|
-
- ext/libyajl2/vendored/test/cases/am_multiple.json.gold
|
164
|
-
- ext/libyajl2/vendored/test/cases/am_stuff.json
|
165
|
-
- ext/libyajl2/vendored/test/cases/am_stuff.json.gold
|
166
|
-
- ext/libyajl2/vendored/test/cases/ap_array_open.json
|
167
|
-
- ext/libyajl2/vendored/test/cases/ap_array_open.json.gold
|
168
|
-
- ext/libyajl2/vendored/test/cases/ap_eof_str.json
|
169
|
-
- ext/libyajl2/vendored/test/cases/ap_eof_str.json.gold
|
170
|
-
- ext/libyajl2/vendored/test/cases/ap_map_open.json
|
171
|
-
- ext/libyajl2/vendored/test/cases/ap_map_open.json.gold
|
172
|
-
- ext/libyajl2/vendored/test/cases/ap_partial_ok.json
|
173
|
-
- ext/libyajl2/vendored/test/cases/ap_partial_ok.json.gold
|
174
|
-
- ext/libyajl2/vendored/test/cases/array.json
|
175
|
-
- ext/libyajl2/vendored/test/cases/array.json.gold
|
176
|
-
- ext/libyajl2/vendored/test/cases/array_close.json
|
177
|
-
- ext/libyajl2/vendored/test/cases/array_close.json.gold
|
178
|
-
- ext/libyajl2/vendored/test/cases/bignums.json
|
179
|
-
- ext/libyajl2/vendored/test/cases/bignums.json.gold
|
180
|
-
- ext/libyajl2/vendored/test/cases/bogus_char.json
|
181
|
-
- ext/libyajl2/vendored/test/cases/bogus_char.json.gold
|
182
|
-
- ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json
|
183
|
-
- ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json.gold
|
184
|
-
- ext/libyajl2/vendored/test/cases/deep_arrays.json
|
185
|
-
- ext/libyajl2/vendored/test/cases/deep_arrays.json.gold
|
186
|
-
- ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json
|
187
|
-
- ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json.gold
|
188
|
-
- ext/libyajl2/vendored/test/cases/doubles.json
|
189
|
-
- ext/libyajl2/vendored/test/cases/doubles.json.gold
|
190
|
-
- ext/libyajl2/vendored/test/cases/doubles_in_array.json
|
191
|
-
- ext/libyajl2/vendored/test/cases/doubles_in_array.json.gold
|
192
|
-
- ext/libyajl2/vendored/test/cases/empty_array.json
|
193
|
-
- ext/libyajl2/vendored/test/cases/empty_array.json.gold
|
194
|
-
- ext/libyajl2/vendored/test/cases/empty_string.json
|
195
|
-
- ext/libyajl2/vendored/test/cases/empty_string.json.gold
|
196
|
-
- ext/libyajl2/vendored/test/cases/escaped_bulgarian.json
|
197
|
-
- ext/libyajl2/vendored/test/cases/escaped_bulgarian.json.gold
|
198
|
-
- ext/libyajl2/vendored/test/cases/escaped_foobar.json
|
199
|
-
- ext/libyajl2/vendored/test/cases/escaped_foobar.json.gold
|
200
|
-
- ext/libyajl2/vendored/test/cases/false.json
|
201
|
-
- ext/libyajl2/vendored/test/cases/false.json.gold
|
202
|
-
- ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json
|
203
|
-
- ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json.gold
|
204
|
-
- ext/libyajl2/vendored/test/cases/fg_issue_7.json
|
205
|
-
- ext/libyajl2/vendored/test/cases/fg_issue_7.json.gold
|
206
|
-
- ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json
|
207
|
-
- ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json.gold
|
208
|
-
- ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json
|
209
|
-
- ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json.gold
|
210
|
-
- ext/libyajl2/vendored/test/cases/four_byte_utf8.json
|
211
|
-
- ext/libyajl2/vendored/test/cases/four_byte_utf8.json.gold
|
212
|
-
- ext/libyajl2/vendored/test/cases/high_overflow.json
|
213
|
-
- ext/libyajl2/vendored/test/cases/high_overflow.json.gold
|
214
|
-
- ext/libyajl2/vendored/test/cases/integers.json
|
215
|
-
- ext/libyajl2/vendored/test/cases/integers.json.gold
|
216
|
-
- ext/libyajl2/vendored/test/cases/invalid_utf8.json
|
217
|
-
- ext/libyajl2/vendored/test/cases/invalid_utf8.json.gold
|
218
|
-
- ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json
|
219
|
-
- ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json.gold
|
220
|
-
- ext/libyajl2/vendored/test/cases/leading_zero_in_number.json
|
221
|
-
- ext/libyajl2/vendored/test/cases/leading_zero_in_number.json.gold
|
222
|
-
- ext/libyajl2/vendored/test/cases/lonely_minus_sign.json
|
223
|
-
- ext/libyajl2/vendored/test/cases/lonely_minus_sign.json.gold
|
224
|
-
- ext/libyajl2/vendored/test/cases/lonely_number.json
|
225
|
-
- ext/libyajl2/vendored/test/cases/lonely_number.json.gold
|
226
|
-
- ext/libyajl2/vendored/test/cases/low_overflow.json
|
227
|
-
- ext/libyajl2/vendored/test/cases/low_overflow.json.gold
|
228
|
-
- ext/libyajl2/vendored/test/cases/map_close.json
|
229
|
-
- ext/libyajl2/vendored/test/cases/map_close.json.gold
|
230
|
-
- ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json
|
231
|
-
- ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json.gold
|
232
|
-
- ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json
|
233
|
-
- ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json.gold
|
234
|
-
- ext/libyajl2/vendored/test/cases/multiple.json
|
235
|
-
- ext/libyajl2/vendored/test/cases/multiple.json.gold
|
236
|
-
- ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json
|
237
|
-
- ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json.gold
|
238
|
-
- ext/libyajl2/vendored/test/cases/np_partial_bad.json
|
239
|
-
- ext/libyajl2/vendored/test/cases/np_partial_bad.json.gold
|
240
|
-
- ext/libyajl2/vendored/test/cases/null.json
|
241
|
-
- ext/libyajl2/vendored/test/cases/null.json.gold
|
242
|
-
- ext/libyajl2/vendored/test/cases/nulls_and_bools.json
|
243
|
-
- ext/libyajl2/vendored/test/cases/nulls_and_bools.json.gold
|
244
|
-
- ext/libyajl2/vendored/test/cases/simple.json
|
245
|
-
- ext/libyajl2/vendored/test/cases/simple.json.gold
|
246
|
-
- ext/libyajl2/vendored/test/cases/simple_with_comments.json
|
247
|
-
- ext/libyajl2/vendored/test/cases/simple_with_comments.json.gold
|
248
|
-
- ext/libyajl2/vendored/test/cases/string_invalid_escape.json
|
249
|
-
- ext/libyajl2/vendored/test/cases/string_invalid_escape.json.gold
|
250
|
-
- ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json
|
251
|
-
- ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json.gold
|
252
|
-
- ext/libyajl2/vendored/test/cases/string_with_escapes.json
|
253
|
-
- ext/libyajl2/vendored/test/cases/string_with_escapes.json.gold
|
254
|
-
- ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json
|
255
|
-
- ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json.gold
|
256
|
-
- ext/libyajl2/vendored/test/cases/three_byte_utf8.json
|
257
|
-
- ext/libyajl2/vendored/test/cases/three_byte_utf8.json.gold
|
258
|
-
- ext/libyajl2/vendored/test/cases/true.json
|
259
|
-
- ext/libyajl2/vendored/test/cases/true.json.gold
|
260
|
-
- ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json
|
261
|
-
- ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json.gold
|
262
|
-
- ext/libyajl2/vendored/test/cases/zerobyte.json
|
263
|
-
- ext/libyajl2/vendored/test/cases/zerobyte.json.gold
|
264
|
-
- ext/libyajl2/vendored/test/run_tests.sh
|
265
|
-
- ext/libyajl2/vendored/test/yajl_test.c
|
266
|
-
- ext/libyajl2/vendored/verify/CMakeLists.txt
|
267
|
-
- ext/libyajl2/vendored/verify/json_verify.c
|
106
|
+
- ext/libyajl2/mkmf.log
|
268
107
|
- lib/ffi_yajl.rb
|
269
108
|
- lib/ffi_yajl/benchmark.rb
|
270
109
|
- lib/ffi_yajl/benchmark/MIT-LICENSE
|
@@ -295,9 +134,9 @@ files:
|
|
295
134
|
- lib/ffi_yajl/json_gem.rb
|
296
135
|
- lib/ffi_yajl/parser.rb
|
297
136
|
- lib/ffi_yajl/version.rb
|
298
|
-
- lib/libyajl.
|
299
|
-
- lib/libyajl.
|
300
|
-
- lib/libyajl.
|
137
|
+
- lib/libyajl.2.0.1.dylib
|
138
|
+
- lib/libyajl.2.dylib
|
139
|
+
- lib/libyajl.dylib
|
301
140
|
- lib/libyajl_s.a
|
302
141
|
- spec/ffi_yajl/encoder_spec.rb
|
303
142
|
- spec/ffi_yajl/json_gem_spec.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
Short story (If you already have ruby and cmake):
|
2
|
-
|
3
|
-
./configure && make install
|
4
|
-
|
5
|
-
When things go wrong:
|
6
|
-
|
7
|
-
attain CMake (http://www.cmake.org) and ruby (http://ruby-lang.org) and
|
8
|
-
try again.
|
9
|
-
|
10
|
-
OR, attain CMake and build by hand:
|
11
|
-
|
12
|
-
1. mkdir build
|
13
|
-
2. cd build
|
14
|
-
3. cmake ..
|
15
|
-
4. make
|
16
|
-
5. build output left in yajl-X.Y.Z
|
17
|
-
|
18
|
-
NOTE: for 64-bit systems where lib64 is used you can pass the cmake
|
19
|
-
variable LIB_SUFFIX to cause installation into the system's 'lib64'
|
20
|
-
directory.
|
21
|
-
|
22
|
-
best,
|
23
|
-
lloyd
|
@@ -1,27 +0,0 @@
|
|
1
|
-
YAJL has been successfully built using Visual Studio 8. CMake, a
|
2
|
-
build file generator, is used to build the software. CMake supports
|
3
|
-
several different build environments, so you may either build YAJL
|
4
|
-
using the IDE via the following steps:
|
5
|
-
|
6
|
-
1. acquire cmake (http://www.cmake.org)
|
7
|
-
2. mkdir build
|
8
|
-
3. cd build
|
9
|
-
4. cmake ..
|
10
|
-
5. devenv YetAnotherJSONParser.sln /project ALL_BUILD /build Release
|
11
|
-
6. build output is left in build/yajl-X.Y.Z
|
12
|
-
|
13
|
-
Or you can build from the command line using nmake:
|
14
|
-
|
15
|
-
1. Click Start > Programs > Microsoft Visual Studio > Visual Studio
|
16
|
-
Tools > Visual Studio Command Prompt -- for your version of Visual
|
17
|
-
Studio, which will open a command prompt. You may verify that the
|
18
|
-
compiler is in your path by typing "cl /?" at the prompt.
|
19
|
-
2. cd C:\path\to\yajl\source\
|
20
|
-
3. mkdir build
|
21
|
-
4. cd build
|
22
|
-
5. cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
|
23
|
-
6. nmake
|
24
|
-
7. nmake install
|
25
|
-
|
26
|
-
Earlier versions of visual studio and other build generators haven't
|
27
|
-
been thoroughly tested, but should work without any major issues.
|