oj 3.11.0 → 3.16.5
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 +4 -4
- data/CHANGELOG.md +1421 -0
- data/README.md +20 -5
- data/RELEASE_NOTES.md +61 -0
- data/ext/oj/buf.h +48 -38
- data/ext/oj/cache.c +329 -0
- data/ext/oj/cache.h +22 -0
- data/ext/oj/cache8.c +60 -62
- data/ext/oj/cache8.h +8 -7
- data/ext/oj/circarray.c +35 -35
- data/ext/oj/circarray.h +11 -9
- data/ext/oj/code.c +156 -174
- data/ext/oj/code.h +19 -18
- data/ext/oj/compat.c +140 -197
- data/ext/oj/custom.c +737 -879
- data/ext/oj/debug.c +126 -0
- data/ext/oj/dump.c +830 -835
- data/ext/oj/dump.h +65 -53
- data/ext/oj/dump_compat.c +566 -642
- data/ext/oj/dump_leaf.c +95 -182
- data/ext/oj/dump_object.c +518 -659
- data/ext/oj/dump_strict.c +301 -334
- data/ext/oj/encode.h +3 -4
- data/ext/oj/encoder.c +43 -0
- data/ext/oj/err.c +27 -24
- data/ext/oj/err.h +38 -13
- data/ext/oj/extconf.rb +23 -7
- data/ext/oj/fast.c +1043 -1073
- 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 +449 -423
- data/ext/oj/object.c +530 -576
- data/ext/oj/odd.c +155 -138
- data/ext/oj/odd.h +24 -22
- data/ext/oj/oj.c +1331 -993
- data/ext/oj/oj.h +306 -292
- data/ext/oj/parse.c +934 -938
- data/ext/oj/parse.h +73 -70
- data/ext/oj/parser.c +1600 -0
- data/ext/oj/parser.h +101 -0
- data/ext/oj/rails.c +795 -845
- data/ext/oj/rails.h +7 -7
- data/ext/oj/reader.c +132 -140
- data/ext/oj/reader.h +67 -78
- data/ext/oj/resolve.c +40 -59
- data/ext/oj/resolve.h +3 -2
- data/ext/oj/rxclass.c +67 -67
- data/ext/oj/rxclass.h +11 -9
- data/ext/oj/saj.c +441 -480
- data/ext/oj/saj2.c +584 -0
- data/ext/oj/saj2.h +23 -0
- data/ext/oj/scp.c +78 -111
- data/ext/oj/sparse.c +726 -730
- data/ext/oj/stream_writer.c +146 -165
- data/ext/oj/strict.c +103 -123
- data/ext/oj/string_writer.c +241 -253
- data/ext/oj/trace.c +29 -33
- data/ext/oj/trace.h +41 -11
- data/ext/oj/usual.c +1218 -0
- data/ext/oj/usual.h +69 -0
- data/ext/oj/util.c +103 -103
- data/ext/oj/util.h +3 -2
- data/ext/oj/val_stack.c +60 -49
- data/ext/oj/val_stack.h +79 -85
- data/ext/oj/validate.c +46 -0
- data/ext/oj/wab.c +307 -350
- data/lib/oj/active_support_helper.rb +1 -3
- data/lib/oj/bag.rb +8 -1
- data/lib/oj/easy_hash.rb +9 -9
- data/lib/oj/error.rb +1 -2
- data/lib/oj/json.rb +162 -150
- data/lib/oj/mimic.rb +9 -19
- data/lib/oj/saj.rb +20 -6
- data/lib/oj/schandler.rb +5 -4
- data/lib/oj/state.rb +12 -8
- data/lib/oj/version.rb +1 -2
- data/lib/oj.rb +2 -0
- data/pages/Compatibility.md +1 -1
- data/pages/InstallOptions.md +20 -0
- data/pages/JsonGem.md +15 -0
- data/pages/Modes.md +8 -3
- data/pages/Options.md +43 -5
- data/pages/Parser.md +309 -0
- data/pages/Rails.md +14 -2
- data/test/_test_active.rb +8 -9
- data/test/_test_active_mimic.rb +7 -8
- data/test/_test_mimic_rails.rb +17 -20
- data/test/activerecord/result_test.rb +12 -8
- data/test/activesupport6/encoding_test.rb +63 -28
- data/test/{activesupport5 → activesupport7}/abstract_unit.rb +16 -12
- data/test/{activesupport5 → activesupport7}/decoding_test.rb +2 -10
- data/test/{activesupport5 → activesupport7}/encoding_test.rb +86 -50
- data/test/{activesupport5 → activesupport7}/encoding_test_cases.rb +6 -0
- data/test/{activesupport5 → activesupport7}/time_zone_test_helpers.rb +8 -0
- data/test/files.rb +15 -15
- data/test/foo.rb +17 -43
- data/test/helper.rb +16 -3
- data/test/isolated/shared.rb +3 -2
- data/test/json_gem/json_addition_test.rb +2 -2
- data/test/json_gem/json_common_interface_test.rb +8 -6
- data/test/json_gem/json_encoding_test.rb +0 -0
- data/test/json_gem/json_ext_parser_test.rb +1 -0
- data/test/json_gem/json_fixtures_test.rb +3 -2
- data/test/json_gem/json_generator_test.rb +71 -41
- data/test/json_gem/json_generic_object_test.rb +11 -11
- data/test/json_gem/json_parser_test.rb +54 -47
- data/test/json_gem/json_string_matching_test.rb +9 -9
- data/test/json_gem/test_helper.rb +12 -0
- data/test/mem.rb +34 -0
- data/test/perf.rb +22 -27
- data/test/perf_compat.rb +31 -33
- data/test/perf_dump.rb +50 -0
- data/test/perf_fast.rb +80 -82
- data/test/perf_file.rb +27 -29
- data/test/perf_object.rb +65 -69
- data/test/perf_once.rb +59 -0
- data/test/perf_parser.rb +183 -0
- data/test/perf_saj.rb +46 -54
- data/test/perf_scp.rb +58 -69
- data/test/perf_simple.rb +41 -39
- data/test/perf_strict.rb +74 -82
- data/test/perf_wab.rb +67 -69
- data/test/prec.rb +5 -5
- data/test/sample/change.rb +0 -1
- data/test/sample/dir.rb +0 -1
- data/test/sample/doc.rb +0 -1
- data/test/sample/file.rb +0 -1
- data/test/sample/group.rb +0 -1
- data/test/sample/hasprops.rb +0 -1
- data/test/sample/layer.rb +0 -1
- data/test/sample/rect.rb +0 -1
- data/test/sample/shape.rb +0 -1
- data/test/sample/text.rb +0 -1
- data/test/sample.rb +16 -16
- data/test/sample_json.rb +8 -8
- data/test/test_compat.rb +97 -45
- data/test/test_custom.rb +73 -51
- data/test/test_debian.rb +7 -10
- data/test/test_fast.rb +135 -79
- data/test/test_file.rb +41 -30
- data/test/test_gc.rb +16 -5
- data/test/test_generate.rb +21 -0
- data/test/test_hash.rb +15 -5
- data/test/test_integer_range.rb +9 -9
- data/test/test_null.rb +20 -20
- data/test/test_object.rb +99 -96
- data/test/test_parser.rb +11 -0
- data/test/test_parser_debug.rb +27 -0
- data/test/test_parser_saj.rb +337 -0
- data/test/test_parser_usual.rb +251 -0
- data/test/test_rails.rb +2 -2
- data/test/test_saj.rb +10 -8
- data/test/test_scp.rb +38 -40
- data/test/test_strict.rb +40 -32
- data/test/test_various.rb +165 -84
- data/test/test_wab.rb +48 -44
- data/test/test_writer.rb +47 -47
- data/test/tests.rb +13 -5
- data/test/tests_mimic.rb +12 -3
- data/test/tests_mimic_addition.rb +12 -3
- metadata +75 -127
- data/ext/oj/hash.c +0 -135
- data/ext/oj/hash.h +0 -18
- data/ext/oj/hash_test.c +0 -484
- data/test/activesupport4/decoding_test.rb +0 -108
- data/test/activesupport4/encoding_test.rb +0 -531
- data/test/activesupport4/test_helper.rb +0 -41
- data/test/activesupport5/test_helper.rb +0 -72
- data/test/bar.rb +0 -35
- data/test/baz.rb +0 -16
- data/test/zoo.rb +0 -13
data/ext/oj/resolve.c
CHANGED
@@ -1,99 +1,80 @@
|
|
1
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.
|
2
3
|
|
3
|
-
#include <stdlib.h>
|
4
4
|
#include <stdio.h>
|
5
|
+
#include <stdlib.h>
|
5
6
|
#include <string.h>
|
6
7
|
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
7
8
|
#include <pthread.h>
|
8
9
|
#endif
|
9
10
|
|
10
|
-
#include "oj.h"
|
11
11
|
#include "err.h"
|
12
|
+
#include "intern.h"
|
13
|
+
#include "oj.h"
|
12
14
|
#include "parse.h"
|
13
|
-
#include "hash.h"
|
14
15
|
|
15
|
-
inline static VALUE
|
16
|
-
|
17
|
-
|
18
|
-
ID ci = rb_intern(classname);
|
16
|
+
inline static VALUE resolve_classname(VALUE mod, const char *classname, int auto_define) {
|
17
|
+
VALUE clas;
|
18
|
+
ID ci = rb_intern(classname);
|
19
19
|
|
20
20
|
if (rb_const_defined_at(mod, ci)) {
|
21
|
-
|
21
|
+
clas = rb_const_get_at(mod, ci);
|
22
22
|
} else if (auto_define) {
|
23
|
-
|
23
|
+
clas = rb_define_class_under(mod, classname, oj_bag_class);
|
24
24
|
} else {
|
25
|
-
|
25
|
+
clas = Qundef;
|
26
26
|
}
|
27
27
|
return clas;
|
28
28
|
}
|
29
29
|
|
30
|
-
static VALUE
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
char
|
35
|
-
char
|
36
|
-
const char *n = name;
|
30
|
+
static VALUE resolve_classpath(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class) {
|
31
|
+
char class_name[1024];
|
32
|
+
VALUE clas;
|
33
|
+
char *end = class_name + sizeof(class_name) - 1;
|
34
|
+
char *s;
|
35
|
+
const char *n = name;
|
37
36
|
|
38
37
|
clas = rb_cObject;
|
39
38
|
for (s = class_name; 0 < len; n++, len--) {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
39
|
+
if (':' == *n) {
|
40
|
+
*s = '\0';
|
41
|
+
n++;
|
42
|
+
len--;
|
43
|
+
if (':' != *n) {
|
44
|
+
return Qundef;
|
45
|
+
}
|
46
|
+
if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
|
47
|
+
return Qundef;
|
48
|
+
}
|
49
|
+
s = class_name;
|
50
|
+
} else if (end <= s) {
|
51
|
+
return Qundef;
|
52
|
+
} else {
|
53
|
+
*s++ = *n;
|
54
|
+
}
|
56
55
|
}
|
57
56
|
*s = '\0';
|
58
57
|
if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
oj_set_error_at(pi, error_class, __FILE__, __LINE__, "class %s is not defined", name);
|
59
|
+
if (Qnil != error_class) {
|
60
|
+
pi->err_class = error_class;
|
61
|
+
}
|
63
62
|
}
|
64
63
|
return clas;
|
65
64
|
}
|
66
65
|
|
67
66
|
VALUE
|
68
67
|
oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class) {
|
69
|
-
VALUE clas;
|
70
|
-
VALUE *slot;
|
71
|
-
|
72
68
|
if (No == pi->options.class_cache) {
|
73
|
-
|
69
|
+
return resolve_classpath(pi, name, len, auto_define, error_class);
|
74
70
|
}
|
75
|
-
|
76
|
-
pthread_mutex_lock(&oj_cache_mutex);
|
77
|
-
#else
|
78
|
-
rb_mutex_lock(oj_cache_mutex);
|
79
|
-
#endif
|
80
|
-
if (Qnil == (clas = oj_class_hash_get(name, len, &slot))) {
|
81
|
-
if (Qundef != (clas = resolve_classpath(pi, name, len, auto_define, error_class))) {
|
82
|
-
*slot = clas;
|
83
|
-
}
|
84
|
-
}
|
85
|
-
#ifdef HAVE_PTHREAD_MUTEX_INIT
|
86
|
-
pthread_mutex_unlock(&oj_cache_mutex);
|
87
|
-
#else
|
88
|
-
rb_mutex_unlock(oj_cache_mutex);
|
89
|
-
#endif
|
90
|
-
return clas;
|
71
|
+
return oj_class_intern(name, len, true, pi, auto_define, error_class);
|
91
72
|
}
|
92
73
|
|
93
74
|
VALUE
|
94
75
|
oj_name2struct(ParseInfo pi, VALUE nameVal, VALUE error_class) {
|
95
|
-
size_t
|
96
|
-
const char
|
76
|
+
size_t len = RSTRING_LEN(nameVal);
|
77
|
+
const char *str = StringValuePtr(nameVal);
|
97
78
|
|
98
79
|
return resolve_classpath(pi, str, len, 0, error_class);
|
99
80
|
}
|
data/ext/oj/resolve.h
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
// Copyright (c) 2011 Peter Ohler. All rights reserved.
|
2
|
+
// Licensed under the MIT License. See LICENSE file in the project root for license details.
|
2
3
|
|
3
4
|
#ifndef OJ_RESOLVE_H
|
4
5
|
#define OJ_RESOLVE_H
|
5
6
|
|
6
7
|
#include "ruby.h"
|
7
8
|
|
8
|
-
extern VALUE
|
9
|
-
extern VALUE
|
9
|
+
extern VALUE oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class);
|
10
|
+
extern VALUE oj_name2struct(ParseInfo pi, VALUE nameVal, VALUE error_class);
|
10
11
|
|
11
12
|
#endif /* OJ_RESOLVE_H */
|
data/ext/oj/rxclass.c
CHANGED
@@ -1,76 +1,77 @@
|
|
1
1
|
// Copyright (c) 2017 Peter Ohler. All rights reserved.
|
2
|
+
// Licensed under the MIT License. See LICENSE file in the project root for license details.
|
2
3
|
|
3
|
-
#include <sys/types.h>
|
4
|
-
#include <stdlib.h>
|
5
4
|
#include <errno.h>
|
6
|
-
#include <string.h>
|
7
5
|
#include <stdio.h>
|
6
|
+
#include <stdlib.h>
|
7
|
+
#include <string.h>
|
8
|
+
#include <sys/types.h>
|
8
9
|
#if !IS_WINDOWS
|
9
10
|
#include <regex.h>
|
10
11
|
#endif
|
11
12
|
|
13
|
+
#include "mem.h"
|
12
14
|
#include "rxclass.h"
|
13
15
|
|
14
16
|
typedef struct _rxC {
|
15
|
-
struct _rxC
|
16
|
-
VALUE
|
17
|
+
struct _rxC *next;
|
18
|
+
VALUE rrx;
|
17
19
|
#if !IS_WINDOWS
|
18
|
-
regex_t
|
20
|
+
regex_t rx;
|
19
21
|
#endif
|
20
|
-
VALUE
|
21
|
-
char
|
22
|
+
VALUE clas;
|
23
|
+
char src[256];
|
22
24
|
} *RxC;
|
23
25
|
|
24
|
-
void
|
25
|
-
oj_rxclass_init(RxClass rc) {
|
26
|
+
void oj_rxclass_init(RxClass rc) {
|
26
27
|
*rc->err = '\0';
|
27
28
|
rc->head = NULL;
|
28
29
|
rc->tail = NULL;
|
29
30
|
}
|
30
31
|
|
31
|
-
void
|
32
|
-
|
33
|
-
RxC rxc;
|
32
|
+
void oj_rxclass_cleanup(RxClass rc) {
|
33
|
+
RxC rxc;
|
34
34
|
|
35
35
|
while (NULL != (rxc = rc->head)) {
|
36
|
-
|
36
|
+
rc->head = rc->head->next;
|
37
37
|
#if !IS_WINDOWS
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
if (Qnil == rxc->rrx) {
|
39
|
+
regfree(&rxc->rx);
|
40
|
+
}
|
41
|
+
OJ_R_FREE(rxc);
|
42
42
|
#endif
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
|
-
void
|
47
|
-
|
48
|
-
RxC rxc = ALLOC_N(struct _rxC, 1);
|
46
|
+
void oj_rxclass_rappend(RxClass rc, VALUE rx, VALUE clas) {
|
47
|
+
RxC rxc = OJ_R_ALLOC_N(struct _rxC, 1);
|
49
48
|
|
50
49
|
memset(rxc, 0, sizeof(struct _rxC));
|
51
|
-
rxc->rrx
|
50
|
+
rxc->rrx = rx;
|
52
51
|
rxc->clas = clas;
|
53
52
|
if (NULL == rc->tail) {
|
54
|
-
|
53
|
+
rc->head = rxc;
|
55
54
|
} else {
|
56
|
-
|
55
|
+
rc->tail->next = rxc;
|
57
56
|
}
|
58
57
|
rc->tail = rxc;
|
59
58
|
}
|
60
59
|
|
61
60
|
// Attempt to compile the expression. If it fails populate the error code..
|
62
|
-
int
|
63
|
-
|
64
|
-
RxC rxc;
|
61
|
+
int oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
|
62
|
+
RxC rxc;
|
65
63
|
#if !IS_WINDOWS
|
66
|
-
int
|
67
|
-
int
|
64
|
+
int err;
|
65
|
+
int flags = 0;
|
68
66
|
#endif
|
69
67
|
if (sizeof(rxc->src) <= strlen(expr)) {
|
70
|
-
|
71
|
-
|
68
|
+
snprintf(rc->err,
|
69
|
+
sizeof(rc->err),
|
70
|
+
"expressions must be less than %lu characters",
|
71
|
+
(unsigned long)sizeof(rxc->src));
|
72
|
+
return EINVAL;
|
72
73
|
}
|
73
|
-
rxc
|
74
|
+
rxc = OJ_R_ALLOC_N(struct _rxC, 1);
|
74
75
|
rxc->next = 0;
|
75
76
|
rxc->clas = clas;
|
76
77
|
|
@@ -79,15 +80,15 @@ oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
|
|
79
80
|
#else
|
80
81
|
rxc->rrx = Qnil;
|
81
82
|
if (0 != (err = regcomp(&rxc->rx, expr, flags))) {
|
82
|
-
|
83
|
-
|
84
|
-
|
83
|
+
regerror(err, &rxc->rx, rc->err, sizeof(rc->err));
|
84
|
+
OJ_FREE(rxc);
|
85
|
+
return err;
|
85
86
|
}
|
86
87
|
#endif
|
87
88
|
if (NULL == rc->tail) {
|
88
|
-
|
89
|
+
rc->head = rxc;
|
89
90
|
} else {
|
90
|
-
|
91
|
+
rc->tail->next = rxc;
|
91
92
|
}
|
92
93
|
rc->tail = rxc;
|
93
94
|
|
@@ -96,49 +97,48 @@ oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
|
|
96
97
|
|
97
98
|
VALUE
|
98
99
|
oj_rxclass_match(RxClass rc, const char *str, int len) {
|
99
|
-
RxC
|
100
|
-
char
|
100
|
+
RxC rxc;
|
101
|
+
char buf[4096];
|
101
102
|
|
102
103
|
for (rxc = rc->head; NULL != rxc; rxc = rxc->next) {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
104
|
+
if (Qnil != rxc->rrx) {
|
105
|
+
// Must use a valiabel for this to work.
|
106
|
+
volatile VALUE rstr = rb_str_new(str, len);
|
107
|
+
|
108
|
+
// if (Qtrue == rb_funcall(rxc->rrx, rb_intern("match?"), 1, rstr)) {
|
109
|
+
if (Qnil != rb_funcall(rxc->rrx, rb_intern("match"), 1, rstr)) {
|
110
|
+
return rxc->clas;
|
111
|
+
}
|
112
|
+
} else if (len < (int)sizeof(buf)) {
|
112
113
|
#if !IS_WINDOWS
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
114
|
+
// string is not \0 terminated so copy and attempt a match
|
115
|
+
memcpy(buf, str, len);
|
116
|
+
buf[len] = '\0';
|
117
|
+
if (0 == regexec(&rxc->rx, buf, 0, NULL, 0)) { // match
|
118
|
+
return rxc->clas;
|
119
|
+
}
|
119
120
|
#endif
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
} else {
|
122
|
+
// TBD allocate a larger buffer and attempt
|
123
|
+
}
|
123
124
|
}
|
124
125
|
return Qnil;
|
125
126
|
}
|
126
127
|
|
127
|
-
void
|
128
|
-
oj_rxclass_copy(RxClass src, RxClass dest) {
|
128
|
+
void oj_rxclass_copy(RxClass src, RxClass dest) {
|
129
129
|
dest->head = NULL;
|
130
130
|
dest->tail = NULL;
|
131
131
|
if (NULL != src->head) {
|
132
|
-
|
132
|
+
RxC rxc;
|
133
133
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
134
|
+
for (rxc = src->head; NULL != rxc; rxc = rxc->next) {
|
135
|
+
if (Qnil != rxc->rrx) {
|
136
|
+
oj_rxclass_rappend(dest, rxc->rrx, rxc->clas);
|
137
|
+
} else {
|
138
138
|
#if !IS_WINDOWS
|
139
|
-
|
139
|
+
oj_rxclass_append(dest, rxc->src, rxc->clas);
|
140
140
|
#endif
|
141
|
-
|
142
|
-
|
141
|
+
}
|
142
|
+
}
|
143
143
|
}
|
144
144
|
}
|
data/ext/oj/rxclass.h
CHANGED
@@ -1,24 +1,26 @@
|
|
1
1
|
// Copyright (c) 2017 Peter Ohler. All rights reserved.
|
2
|
+
// Licensed under the MIT License. See LICENSE file in the project root for license details.
|
2
3
|
|
3
4
|
#ifndef OJ_RXCLASS_H
|
4
5
|
#define OJ_RXCLASS_H
|
5
6
|
|
6
7
|
#include <stdbool.h>
|
8
|
+
|
7
9
|
#include "ruby.h"
|
8
10
|
|
9
11
|
struct _rxC;
|
10
12
|
|
11
13
|
typedef struct _rxClass {
|
12
|
-
struct _rxC
|
13
|
-
struct _rxC
|
14
|
-
char
|
14
|
+
struct _rxC *head;
|
15
|
+
struct _rxC *tail;
|
16
|
+
char err[128];
|
15
17
|
} *RxClass;
|
16
18
|
|
17
|
-
extern void
|
18
|
-
extern void
|
19
|
-
extern int
|
20
|
-
extern VALUE
|
21
|
-
extern void
|
22
|
-
extern void
|
19
|
+
extern void oj_rxclass_init(RxClass rc);
|
20
|
+
extern void oj_rxclass_cleanup(RxClass rc);
|
21
|
+
extern int oj_rxclass_append(RxClass rc, const char *expr, VALUE clas);
|
22
|
+
extern VALUE oj_rxclass_match(RxClass rc, const char *str, int len);
|
23
|
+
extern void oj_rxclass_copy(RxClass src, RxClass dest);
|
24
|
+
extern void oj_rxclass_rappend(RxClass rc, VALUE rx, VALUE clas);
|
23
25
|
|
24
26
|
#endif /* OJ_RXCLASS_H */
|