fjson 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -5
- data/README +7 -8
- data/Rakefile +56 -17
- data/TODO +1 -0
- data/ext/extensions/array_ext/array_ext.c +118 -0
- data/ext/extensions/array_ext/array_ext.h +12 -0
- data/ext/extensions/array_ext/extconf.rb +7 -0
- data/ext/extensions/false_class_ext/extconf.rb +5 -0
- data/ext/extensions/false_class_ext/false_class_ext.c +19 -0
- data/ext/extensions/false_class_ext/false_class_ext.h +4 -0
- data/ext/extensions/float_ext/extconf.rb +5 -0
- data/ext/extensions/float_ext/float_ext.c +19 -0
- data/ext/extensions/float_ext/float_ext.h +4 -0
- data/ext/extensions/hash_ext/extconf.rb +7 -0
- data/ext/extensions/hash_ext/hash_ext.c +128 -0
- data/ext/extensions/hash_ext/hash_ext.h +13 -0
- data/ext/extensions/integer_ext/extconf.rb +5 -0
- data/ext/extensions/integer_ext/integer_ext.c +19 -0
- data/ext/extensions/integer_ext/integer_ext.h +4 -0
- data/ext/extensions/nil_class_ext/extconf.rb +5 -0
- data/ext/extensions/nil_class_ext/nil_class_ext.c +19 -0
- data/ext/extensions/nil_class_ext/nil_class_ext.h +4 -0
- data/ext/extensions/object_ext/extconf.rb +5 -0
- data/ext/extensions/object_ext/object_ext.c +21 -0
- data/ext/extensions/object_ext/object_ext.h +4 -0
- data/ext/extensions/string_ext/extconf.rb +5 -0
- data/ext/extensions/string_ext/string_ext.c +27 -0
- data/ext/extensions/string_ext/string_ext.h +4 -0
- data/ext/extensions/true_class_ext/extconf.rb +5 -0
- data/ext/extensions/true_class_ext/true_class_ext.c +19 -0
- data/ext/extensions/true_class_ext/true_class_ext.h +4 -0
- data/ext/json_ext/extconf.rb +5 -0
- data/ext/json_ext/json_ext.c +180 -0
- data/ext/json_ext/json_ext.h +9 -0
- data/ext/state_ext/extconf.rb +5 -0
- data/ext/state_ext/state_ext.c +169 -0
- data/ext/state_ext/state_ext.h +14 -0
- data/hash_benchmark.rb +15 -0
- data/install.rb +21 -0
- data/rake_helper.rb +34 -0
- metadata +52 -20
- data/VERSION +0 -1
- data/lib/extensions/array_ext.so +0 -0
- data/lib/extensions/false_class_ext.so +0 -0
- data/lib/extensions/float_ext.so +0 -0
- data/lib/extensions/hash_ext.so +0 -0
- data/lib/extensions/integer_ext.so +0 -0
- data/lib/extensions/nil_class_ext.so +0 -0
- data/lib/extensions/object_ext.so +0 -0
- data/lib/extensions/string_ext.so +0 -0
- data/lib/extensions/true_class_ext.so +0 -0
- data/lib/json_ext.so +0 -0
- data/lib/state_ext.so +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
#include "ruby.h"
|
2
|
+
#include <string.h>
|
3
|
+
|
4
|
+
static VALUE initialize(int, VALUE*, VALUE);
|
5
|
+
static VALUE state_allocate(VALUE);
|
6
|
+
static VALUE from_state(VALUE, VALUE);
|
7
|
+
static VALUE hash_value_or_empty_string_default(VALUE, const char*);
|
8
|
+
static VALUE seen(VALUE, VALUE);
|
9
|
+
static VALUE remember(VALUE, VALUE);
|
10
|
+
static VALUE forget(VALUE, VALUE);
|
11
|
+
|
12
|
+
static VALUE get_indent(VALUE);
|
13
|
+
static VALUE set_indent(VALUE, VALUE);
|
14
|
+
void rb_json_state_indent(VALUE, VALUE, long);
|
data/hash_benchmark.rb
ADDED
data/install.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rbconfig'
|
4
|
+
require 'fileutils'
|
5
|
+
include FileUtils::Verbose
|
6
|
+
|
7
|
+
include Config
|
8
|
+
|
9
|
+
dest = CONFIG["bindir"]
|
10
|
+
cd 'bin' do
|
11
|
+
filename = 'edit_json.rb'
|
12
|
+
install(filename, dest)
|
13
|
+
end
|
14
|
+
dest = CONFIG["sitelibdir"]
|
15
|
+
cd 'lib' do
|
16
|
+
install('json.rb', dest)
|
17
|
+
mkdir_p File.join(dest,'json')
|
18
|
+
install(File.join('json', 'editor.rb'), File.join(dest,'json'))
|
19
|
+
install(File.join('json', 'json.xpm'), File.join(dest,'json'))
|
20
|
+
end
|
21
|
+
# vim: set et sw=2 ts=2:
|
data/rake_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
def setup_extension(dir, extension=nil)
|
2
|
+
ext_dir = "ext/#{dir}"
|
3
|
+
extension = File.basename(dir) if extension.nil?
|
4
|
+
ext_so = "#{ext_dir}/#{extension}.#{Config::CONFIG['DLEXT']}"
|
5
|
+
|
6
|
+
desc "Builds the #{extension} extension"
|
7
|
+
task extension.to_sym => ["#{ext_dir}/Rakefile", ext_so ]
|
8
|
+
|
9
|
+
file "#{ext_dir}/Rakefile" => ["#{ext_dir}/extconf.rb"] do
|
10
|
+
extconf "#{ext_dir}"
|
11
|
+
end
|
12
|
+
|
13
|
+
ext_files = FileList[
|
14
|
+
"#{ext_dir}/*.c",
|
15
|
+
"#{ext_dir}/*.h",
|
16
|
+
"#{ext_dir}/extconf.rb",
|
17
|
+
"#{ext_dir}/Rakefile",
|
18
|
+
"lib"
|
19
|
+
]
|
20
|
+
ext_subdir = File.dirname(dir)
|
21
|
+
file ext_so => ext_files do
|
22
|
+
rake ext_dir
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def extconf(dir)
|
27
|
+
Dir.chdir(dir) do ruby "extconf.rb" end
|
28
|
+
end
|
29
|
+
|
30
|
+
def rake(rakedir)
|
31
|
+
Dir.chdir(rakedir) do
|
32
|
+
sh("rake")
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: fjson
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-10-
|
6
|
+
version: 0.0.2
|
7
|
+
date: 2006-10-16 00:00:00 -07:00
|
8
8
|
summary: This library is for parsing JSON strings and unparsing ruby data structures. This library is a fork of Florian Frank's JSON library with key parts implemented in C for performance improvements.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -31,27 +31,51 @@ authors:
|
|
31
31
|
files:
|
32
32
|
- Rakefile
|
33
33
|
- GPL
|
34
|
-
- VERSION
|
35
34
|
- TODO
|
36
35
|
- CHANGES
|
37
36
|
- README
|
37
|
+
- rake_helper.rb
|
38
|
+
- install.rb
|
39
|
+
- hash_benchmark.rb
|
38
40
|
- lib/parser.rb
|
39
41
|
- lib/fjson.rb
|
40
42
|
- lib/extensions/kernel.rb
|
41
43
|
- lib/extensions/class.rb
|
42
44
|
- lib/extensions/string.rb
|
43
45
|
- lib/json/editor.rb
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
46
|
+
- ext/extensions/false_class_ext/false_class_ext.h
|
47
|
+
- ext/extensions/hash_ext/hash_ext.h
|
48
|
+
- ext/extensions/true_class_ext/true_class_ext.h
|
49
|
+
- ext/extensions/float_ext/float_ext.h
|
50
|
+
- ext/extensions/object_ext/object_ext.h
|
51
|
+
- ext/extensions/string_ext/string_ext.h
|
52
|
+
- ext/extensions/nil_class_ext/nil_class_ext.h
|
53
|
+
- ext/extensions/integer_ext/integer_ext.h
|
54
|
+
- ext/extensions/array_ext/array_ext.h
|
55
|
+
- ext/state_ext/state_ext.h
|
56
|
+
- ext/json_ext/json_ext.h
|
57
|
+
- ext/extensions/false_class_ext/false_class_ext.c
|
58
|
+
- ext/extensions/hash_ext/hash_ext.c
|
59
|
+
- ext/extensions/true_class_ext/true_class_ext.c
|
60
|
+
- ext/extensions/float_ext/float_ext.c
|
61
|
+
- ext/extensions/object_ext/object_ext.c
|
62
|
+
- ext/extensions/string_ext/string_ext.c
|
63
|
+
- ext/extensions/nil_class_ext/nil_class_ext.c
|
64
|
+
- ext/extensions/integer_ext/integer_ext.c
|
65
|
+
- ext/extensions/array_ext/array_ext.c
|
66
|
+
- ext/state_ext/state_ext.c
|
67
|
+
- ext/json_ext/json_ext.c
|
68
|
+
- ext/extensions/false_class_ext/extconf.rb
|
69
|
+
- ext/extensions/hash_ext/extconf.rb
|
70
|
+
- ext/extensions/true_class_ext/extconf.rb
|
71
|
+
- ext/extensions/float_ext/extconf.rb
|
72
|
+
- ext/extensions/object_ext/extconf.rb
|
73
|
+
- ext/extensions/string_ext/extconf.rb
|
74
|
+
- ext/extensions/nil_class_ext/extconf.rb
|
75
|
+
- ext/extensions/integer_ext/extconf.rb
|
76
|
+
- ext/extensions/array_ext/extconf.rb
|
77
|
+
- ext/state_ext/extconf.rb
|
78
|
+
- ext/json_ext/extconf.rb
|
55
79
|
- spec/true_class_spec.rb
|
56
80
|
- spec/float_spec.rb
|
57
81
|
- spec/string_spec.rb
|
@@ -85,13 +109,21 @@ test_files:
|
|
85
109
|
- spec/string_with_utf8_values_when_supporting_unicode_json_spec.rb
|
86
110
|
rdoc_options: []
|
87
111
|
|
88
|
-
extra_rdoc_files:
|
89
|
-
|
112
|
+
extra_rdoc_files:
|
113
|
+
- README
|
90
114
|
executables: []
|
91
115
|
|
92
|
-
extensions:
|
93
|
-
|
116
|
+
extensions:
|
117
|
+
- Rakefile
|
94
118
|
requirements: []
|
95
119
|
|
96
|
-
dependencies:
|
97
|
-
|
120
|
+
dependencies:
|
121
|
+
- !ruby/object:Gem::Dependency
|
122
|
+
name: mkrf
|
123
|
+
version_requirement:
|
124
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.1.2
|
129
|
+
version:
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.4.1
|
data/lib/extensions/array_ext.so
DELETED
Binary file
|
Binary file
|
data/lib/extensions/float_ext.so
DELETED
Binary file
|
data/lib/extensions/hash_ext.so
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/json_ext.so
DELETED
Binary file
|
data/lib/state_ext.so
DELETED
Binary file
|