yaji 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +1,22 @@
1
1
  /*
2
2
  * Copyright 2010, Lloyd Hilaiel.
3
- *
3
+ *
4
4
  * Redistribution and use in source and binary forms, with or without
5
5
  * modification, are permitted provided that the following conditions are
6
6
  * met:
7
- *
7
+ *
8
8
  * 1. Redistributions of source code must retain the above copyright
9
9
  * notice, this list of conditions and the following disclaimer.
10
- *
10
+ *
11
11
  * 2. Redistributions in binary form must reproduce the above copyright
12
12
  * notice, this list of conditions and the following disclaimer in
13
13
  * the documentation and/or other materials provided with the
14
14
  * distribution.
15
- *
15
+ *
16
16
  * 3. Neither the name of Lloyd Hilaiel nor the names of its
17
17
  * contributors may be used to endorse or promote products derived
18
18
  * from this software without specific prior written permission.
19
- *
19
+ *
20
20
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21
21
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
22
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,21 +28,21 @@
28
28
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29
29
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
30
  * POSSIBILITY OF SUCH DAMAGE.
31
- */
31
+ */
32
32
 
33
33
  /**
34
34
  * \file yajl_gen.h
35
35
  * Interface to YAJL's JSON generation facilities.
36
36
  */
37
37
 
38
- #include <yajl/yajl_common.h>
38
+ #include "api/yajl_common.h"
39
39
 
40
40
  #ifndef __YAJL_GEN_H__
41
41
  #define __YAJL_GEN_H__
42
42
 
43
43
  #ifdef __cplusplus
44
44
  extern "C" {
45
- #endif
45
+ #endif
46
46
  /** generator status codes */
47
47
  typedef enum {
48
48
  /** no error */
@@ -57,7 +57,7 @@ extern "C" {
57
57
  * state */
58
58
  yajl_gen_in_error_state,
59
59
  /** A complete JSON document has been generated */
60
- yajl_gen_generation_complete,
60
+ yajl_gen_generation_complete,
61
61
  /** yajl_gen_double was passed an invalid floating point value
62
62
  * (infinity or NaN). */
63
63
  yajl_gen_invalid_number,
@@ -119,7 +119,7 @@ extern "C" {
119
119
  const yajl_alloc_funcs * allocFuncs,
120
120
  void * ctx);
121
121
 
122
- /** free a generator handle */
122
+ /** free a generator handle */
123
123
  YAJL_API void yajl_gen_free(yajl_gen handle);
124
124
 
125
125
  YAJL_API yajl_gen_status yajl_gen_integer(yajl_gen hand, long int number);
@@ -134,7 +134,7 @@ extern "C" {
134
134
  const unsigned char * str,
135
135
  unsigned int len);
136
136
  YAJL_API yajl_gen_status yajl_gen_null(yajl_gen hand);
137
- YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean);
137
+ YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean);
138
138
  YAJL_API yajl_gen_status yajl_gen_map_open(yajl_gen hand);
139
139
  YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand);
140
140
  YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand);
@@ -154,6 +154,6 @@ extern "C" {
154
154
 
155
155
  #ifdef __cplusplus
156
156
  }
157
- #endif
157
+ #endif
158
158
 
159
159
  #endif
@@ -1,22 +1,22 @@
1
1
  /*
2
2
  * Copyright 2010, Lloyd Hilaiel.
3
- *
3
+ *
4
4
  * Redistribution and use in source and binary forms, with or without
5
5
  * modification, are permitted provided that the following conditions are
6
6
  * met:
7
- *
7
+ *
8
8
  * 1. Redistributions of source code must retain the above copyright
9
9
  * notice, this list of conditions and the following disclaimer.
10
- *
10
+ *
11
11
  * 2. Redistributions in binary form must reproduce the above copyright
12
12
  * notice, this list of conditions and the following disclaimer in
13
13
  * the documentation and/or other materials provided with the
14
14
  * distribution.
15
- *
15
+ *
16
16
  * 3. Neither the name of Lloyd Hilaiel nor the names of its
17
17
  * contributors may be used to endorse or promote products derived
18
18
  * from this software without specific prior written permission.
19
- *
19
+ *
20
20
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21
21
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
22
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,21 +28,21 @@
28
28
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29
29
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
30
  * POSSIBILITY OF SUCH DAMAGE.
31
- */
31
+ */
32
32
 
33
33
  /**
34
34
  * \file yajl_parse.h
35
35
  * Interface to YAJL's JSON parsing facilities.
36
36
  */
37
37
 
38
- #include <yajl/yajl_common.h>
38
+ #include "api/yajl_common.h"
39
39
 
40
40
  #ifndef __YAJL_PARSE_H__
41
41
  #define __YAJL_PARSE_H__
42
42
 
43
43
  #ifdef __cplusplus
44
44
  extern "C" {
45
- #endif
45
+ #endif
46
46
  /** error codes returned from this interface */
47
47
  typedef enum {
48
48
  /** no error was encountered */
@@ -103,12 +103,12 @@ extern "C" {
103
103
  int (* yajl_start_map)(void * ctx);
104
104
  int (* yajl_map_key)(void * ctx, const unsigned char * key,
105
105
  unsigned int stringLen);
106
- int (* yajl_end_map)(void * ctx);
106
+ int (* yajl_end_map)(void * ctx);
107
107
 
108
108
  int (* yajl_start_array)(void * ctx);
109
- int (* yajl_end_array)(void * ctx);
109
+ int (* yajl_end_array)(void * ctx);
110
110
  } yajl_callbacks;
111
-
111
+
112
112
  /** configuration structure for the generator */
113
113
  typedef struct {
114
114
  /** if nonzero, javascript style comments will be allowed in
@@ -132,7 +132,7 @@ extern "C" {
132
132
  const yajl_alloc_funcs * allocFuncs,
133
133
  void * ctx);
134
134
 
135
- /** free a parser handle */
135
+ /** free a parser handle */
136
136
  YAJL_API void yajl_free(yajl_handle handle);
137
137
 
138
138
  /** Parse some json!
@@ -154,7 +154,7 @@ extern "C" {
154
154
  * \param hand - a handle to the json parser allocated with yajl_alloc
155
155
  */
156
156
  YAJL_API yajl_status yajl_parse_complete(yajl_handle hand);
157
-
157
+
158
158
  /** get an error string describing the state of the
159
159
  * parse.
160
160
  *
@@ -163,7 +163,7 @@ extern "C" {
163
163
  * the specific char.
164
164
  *
165
165
  * \returns A dynamically allocated string will be returned which should
166
- * be freed with yajl_free_error
166
+ * be freed with yajl_free_error
167
167
  */
168
168
  YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose,
169
169
  const unsigned char * jsonText,
@@ -174,8 +174,8 @@ extern "C" {
174
174
  *
175
175
  * In the case of a successful parse this can help you understand if
176
176
  * the entire buffer was consumed (which will allow you to handle
177
- * "junk at end of input".
178
- *
177
+ * "junk at end of input".
178
+ *
179
179
  * In the event an error is encountered during parsing, this function
180
180
  * affords the client a way to get the offset into the most recent
181
181
  * chunk where the error occured. 0 will be returned if no error
@@ -188,6 +188,6 @@ extern "C" {
188
188
 
189
189
  #ifdef __cplusplus
190
190
  }
191
- #endif
191
+ #endif
192
192
 
193
193
  #endif
data/ext/yaji/extconf.rb CHANGED
@@ -10,6 +10,7 @@ $CFLAGS << ' -Wall -funroll-loops'
10
10
  $CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']
11
11
 
12
12
  # have_library('yajl', 'yajl_parse', 'yajl/yajl_parse.h')
13
+
13
14
  define("READ_BUFSIZE", "8192")
14
15
 
15
16
  create_header("yaji_config.h")
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- #include <yajl/yajl_parse.h>
19
+ #include "api/yajl_parse.h"
20
20
 
21
21
  #include <ruby.h>
22
22
 
@@ -1,4 +1,4 @@
1
- #include <yajl/yajl_version.h>
1
+ #include "api/yajl_version.h"
2
2
 
3
3
  int yajl_version(void)
4
4
  {
data/lib/yaji/version.rb CHANGED
@@ -18,5 +18,5 @@
18
18
  #
19
19
 
20
20
  module YAJI
21
- VERSION = "0.0.6"
21
+ VERSION = "0.0.7"
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
16
- requirement: &22310600 !ruby/object:Gem::Requirement
16
+ requirement: &9731320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *22310600
24
+ version_requirements: *9731320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &22309980 !ruby/object:Gem::Requirement
27
+ requirement: &9730580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *22309980
35
+ version_requirements: *9730580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: curb
38
- requirement: &22309280 !ruby/object:Gem::Requirement
38
+ requirement: &9730000 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *22309280
46
+ version_requirements: *9730000
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: ruby-debug19
49
- requirement: &22308700 !ruby/object:Gem::Requirement
49
+ requirement: &9729420 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *22308700
57
+ version_requirements: *9729420
58
58
  description: YAJI is a ruby wrapper to YAJL providing iterator interface to streaming
59
59
  JSON parser
60
60
  email: info@couchbase.com