oj 3.7.4 → 3.13.21

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.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1352 -0
  3. data/README.md +29 -8
  4. data/RELEASE_NOTES.md +61 -0
  5. data/ext/oj/buf.h +53 -72
  6. data/ext/oj/cache.c +326 -0
  7. data/ext/oj/cache.h +21 -0
  8. data/ext/oj/cache8.c +61 -64
  9. data/ext/oj/cache8.h +12 -39
  10. data/ext/oj/circarray.c +37 -43
  11. data/ext/oj/circarray.h +16 -17
  12. data/ext/oj/code.c +165 -179
  13. data/ext/oj/code.h +27 -29
  14. data/ext/oj/compat.c +174 -194
  15. data/ext/oj/custom.c +809 -866
  16. data/ext/oj/debug.c +132 -0
  17. data/ext/oj/dump.c +848 -863
  18. data/ext/oj/dump.h +81 -67
  19. data/ext/oj/dump_compat.c +85 -123
  20. data/ext/oj/dump_leaf.c +100 -188
  21. data/ext/oj/dump_object.c +527 -656
  22. data/ext/oj/dump_strict.c +315 -338
  23. data/ext/oj/encode.h +7 -34
  24. data/ext/oj/encoder.c +43 -0
  25. data/ext/oj/err.c +40 -29
  26. data/ext/oj/err.h +48 -48
  27. data/ext/oj/extconf.rb +17 -4
  28. data/ext/oj/fast.c +1070 -1087
  29. data/ext/oj/intern.c +301 -0
  30. data/ext/oj/intern.h +26 -0
  31. data/ext/oj/mimic_json.c +469 -436
  32. data/ext/oj/object.c +525 -593
  33. data/ext/oj/odd.c +154 -138
  34. data/ext/oj/odd.h +37 -38
  35. data/ext/oj/oj.c +1325 -986
  36. data/ext/oj/oj.h +333 -316
  37. data/ext/oj/parse.c +1002 -846
  38. data/ext/oj/parse.h +92 -87
  39. data/ext/oj/parser.c +1557 -0
  40. data/ext/oj/parser.h +91 -0
  41. data/ext/oj/rails.c +888 -878
  42. data/ext/oj/rails.h +11 -14
  43. data/ext/oj/reader.c +141 -147
  44. data/ext/oj/reader.h +73 -89
  45. data/ext/oj/resolve.c +41 -62
  46. data/ext/oj/resolve.h +7 -9
  47. data/ext/oj/rxclass.c +71 -75
  48. data/ext/oj/rxclass.h +18 -19
  49. data/ext/oj/saj.c +443 -486
  50. data/ext/oj/saj2.c +602 -0
  51. data/ext/oj/scp.c +88 -113
  52. data/ext/oj/sparse.c +787 -709
  53. data/ext/oj/stream_writer.c +133 -159
  54. data/ext/oj/strict.c +127 -118
  55. data/ext/oj/string_writer.c +230 -249
  56. data/ext/oj/trace.c +34 -41
  57. data/ext/oj/trace.h +19 -19
  58. data/ext/oj/usual.c +1254 -0
  59. data/ext/oj/util.c +136 -0
  60. data/ext/oj/util.h +20 -0
  61. data/ext/oj/val_stack.c +59 -67
  62. data/ext/oj/val_stack.h +91 -129
  63. data/ext/oj/validate.c +46 -0
  64. data/ext/oj/wab.c +342 -353
  65. data/lib/oj/bag.rb +1 -0
  66. data/lib/oj/easy_hash.rb +5 -4
  67. data/lib/oj/error.rb +1 -1
  68. data/lib/oj/json.rb +1 -1
  69. data/lib/oj/mimic.rb +48 -14
  70. data/lib/oj/saj.rb +20 -6
  71. data/lib/oj/state.rb +8 -7
  72. data/lib/oj/version.rb +2 -2
  73. data/lib/oj.rb +0 -8
  74. data/pages/Compatibility.md +1 -1
  75. data/pages/JsonGem.md +15 -0
  76. data/pages/Modes.md +53 -46
  77. data/pages/Options.md +72 -11
  78. data/pages/Parser.md +309 -0
  79. data/pages/Rails.md +73 -22
  80. data/pages/Security.md +1 -1
  81. data/test/activerecord/result_test.rb +7 -2
  82. data/test/activesupport5/abstract_unit.rb +45 -0
  83. data/test/activesupport5/decoding_test.rb +68 -60
  84. data/test/activesupport5/encoding_test.rb +111 -96
  85. data/test/activesupport5/encoding_test_cases.rb +33 -25
  86. data/test/activesupport5/test_helper.rb +43 -21
  87. data/test/activesupport5/time_zone_test_helpers.rb +18 -3
  88. data/test/activesupport6/abstract_unit.rb +44 -0
  89. data/test/activesupport6/decoding_test.rb +133 -0
  90. data/test/activesupport6/encoding_test.rb +507 -0
  91. data/test/activesupport6/encoding_test_cases.rb +98 -0
  92. data/test/activesupport6/test_common.rb +17 -0
  93. data/test/activesupport6/test_helper.rb +163 -0
  94. data/test/activesupport6/time_zone_test_helpers.rb +39 -0
  95. data/test/activesupport7/abstract_unit.rb +49 -0
  96. data/test/activesupport7/decoding_test.rb +125 -0
  97. data/test/activesupport7/encoding_test.rb +486 -0
  98. data/test/activesupport7/encoding_test_cases.rb +104 -0
  99. data/test/activesupport7/time_zone_test_helpers.rb +47 -0
  100. data/test/bar.rb +6 -12
  101. data/test/baz.rb +16 -0
  102. data/test/bug.rb +16 -0
  103. data/test/foo.rb +69 -75
  104. data/test/helper.rb +16 -0
  105. data/test/json_gem/json_common_interface_test.rb +8 -3
  106. data/test/json_gem/json_generator_test.rb +18 -4
  107. data/test/json_gem/json_parser_test.rb +9 -0
  108. data/test/json_gem/test_helper.rb +12 -0
  109. data/test/mem.rb +33 -0
  110. data/test/perf.rb +1 -1
  111. data/test/perf_dump.rb +50 -0
  112. data/test/perf_once.rb +58 -0
  113. data/test/perf_parser.rb +189 -0
  114. data/test/perf_scp.rb +11 -10
  115. data/test/perf_strict.rb +17 -23
  116. data/test/prec.rb +23 -0
  117. data/test/sample_json.rb +1 -1
  118. data/test/test_compat.rb +46 -10
  119. data/test/test_custom.rb +147 -8
  120. data/test/test_fast.rb +62 -2
  121. data/test/test_file.rb +25 -2
  122. data/test/test_gc.rb +13 -0
  123. data/test/test_generate.rb +21 -0
  124. data/test/test_hash.rb +11 -1
  125. data/test/test_integer_range.rb +7 -2
  126. data/test/test_object.rb +85 -9
  127. data/test/test_parser.rb +27 -0
  128. data/test/test_parser_saj.rb +335 -0
  129. data/test/test_parser_usual.rb +217 -0
  130. data/test/test_rails.rb +35 -0
  131. data/test/test_saj.rb +1 -1
  132. data/test/test_scp.rb +5 -5
  133. data/test/test_strict.rb +26 -1
  134. data/test/test_various.rb +87 -65
  135. data/test/test_wab.rb +2 -0
  136. data/test/test_writer.rb +19 -2
  137. data/test/tests.rb +1 -1
  138. data/test/zoo.rb +13 -0
  139. metadata +60 -110
  140. data/ext/oj/hash.c +0 -163
  141. data/ext/oj/hash.h +0 -46
  142. data/ext/oj/hash_test.c +0 -512
data/ext/oj/resolve.c CHANGED
@@ -1,102 +1,81 @@
1
- /* resolve.c
2
- * Copyright (c) 2012, Peter Ohler
3
- * All rights reserved.
4
- */
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.
5
3
 
6
- #include <stdlib.h>
7
4
  #include <stdio.h>
5
+ #include <stdlib.h>
8
6
  #include <string.h>
9
- #if HAVE_LIBPTHREAD
7
+ #ifdef HAVE_PTHREAD_MUTEX_INIT
10
8
  #include <pthread.h>
11
9
  #endif
12
10
 
13
- #include "oj.h"
14
11
  #include "err.h"
12
+ #include "intern.h"
13
+ #include "oj.h"
15
14
  #include "parse.h"
16
- #include "hash.h"
17
15
 
18
- inline static VALUE
19
- resolve_classname(VALUE mod, const char *classname, int auto_define) {
20
- VALUE clas;
21
- 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);
22
19
 
23
20
  if (rb_const_defined_at(mod, ci)) {
24
- clas = rb_const_get_at(mod, ci);
21
+ clas = rb_const_get_at(mod, ci);
25
22
  } else if (auto_define) {
26
- clas = rb_define_class_under(mod, classname, oj_bag_class);
23
+ clas = rb_define_class_under(mod, classname, oj_bag_class);
27
24
  } else {
28
- clas = Qundef;
25
+ clas = Qundef;
29
26
  }
30
27
  return clas;
31
28
  }
32
29
 
33
30
  static VALUE
34
31
  resolve_classpath(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class) {
35
- char class_name[1024];
36
- VALUE clas;
37
- char *end = class_name + sizeof(class_name) - 1;
38
- char *s;
39
- const char *n = name;
32
+ char class_name[1024];
33
+ VALUE clas;
34
+ char * end = class_name + sizeof(class_name) - 1;
35
+ char * s;
36
+ const char *n = name;
40
37
 
41
38
  clas = rb_cObject;
42
39
  for (s = class_name; 0 < len; n++, len--) {
43
- if (':' == *n) {
44
- *s = '\0';
45
- n++;
46
- len--;
47
- if (':' != *n) {
48
- return Qundef;
49
- }
50
- if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
51
- return Qundef;
52
- }
53
- s = class_name;
54
- } else if (end <= s) {
55
- return Qundef;
56
- } else {
57
- *s++ = *n;
58
- }
40
+ if (':' == *n) {
41
+ *s = '\0';
42
+ n++;
43
+ len--;
44
+ if (':' != *n) {
45
+ return Qundef;
46
+ }
47
+ if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
48
+ return Qundef;
49
+ }
50
+ s = class_name;
51
+ } else if (end <= s) {
52
+ return Qundef;
53
+ } else {
54
+ *s++ = *n;
55
+ }
59
56
  }
60
57
  *s = '\0';
61
58
  if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
62
- oj_set_error_at(pi, error_class, __FILE__, __LINE__, "class %s is not defined", name);
63
- if (Qnil != error_class) {
64
- pi->err_class = error_class;
65
- }
59
+ oj_set_error_at(pi, error_class, __FILE__, __LINE__, "class %s is not defined", name);
60
+ if (Qnil != error_class) {
61
+ pi->err_class = error_class;
62
+ }
66
63
  }
67
64
  return clas;
68
65
  }
69
66
 
70
67
  VALUE
71
68
  oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class) {
72
- VALUE clas;
73
- VALUE *slot;
74
-
75
69
  if (No == pi->options.class_cache) {
76
- return resolve_classpath(pi, name, len, auto_define, error_class);
70
+ return resolve_classpath(pi, name, len, auto_define, error_class);
77
71
  }
78
- #if HAVE_LIBPTHREAD
79
- pthread_mutex_lock(&oj_cache_mutex);
80
- #else
81
- rb_mutex_lock(oj_cache_mutex);
82
- #endif
83
- if (Qnil == (clas = oj_class_hash_get(name, len, &slot))) {
84
- if (Qundef != (clas = resolve_classpath(pi, name, len, auto_define, error_class))) {
85
- *slot = clas;
86
- }
87
- }
88
- #if HAVE_LIBPTHREAD
89
- pthread_mutex_unlock(&oj_cache_mutex);
90
- #else
91
- rb_mutex_unlock(oj_cache_mutex);
92
- #endif
93
- return clas;
72
+ return oj_class_intern(name, len, true, pi, auto_define, error_class);
94
73
  }
95
74
 
96
75
  VALUE
97
76
  oj_name2struct(ParseInfo pi, VALUE nameVal, VALUE error_class) {
98
- size_t len = RSTRING_LEN(nameVal);
99
- const char *str = StringValuePtr(nameVal);
77
+ size_t len = RSTRING_LEN(nameVal);
78
+ const char *str = StringValuePtr(nameVal);
100
79
 
101
80
  return resolve_classpath(pi, str, len, 0, error_class);
102
81
  }
data/ext/oj/resolve.h CHANGED
@@ -1,14 +1,12 @@
1
- /* resolve.h
2
- * Copyright (c) 2011, Peter Ohler
3
- * All rights reserved.
4
- */
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.
5
3
 
6
- #ifndef __OJ_RESOLVE_H__
7
- #define __OJ_RESOLVE_H__
4
+ #ifndef OJ_RESOLVE_H
5
+ #define OJ_RESOLVE_H
8
6
 
9
7
  #include "ruby.h"
10
8
 
11
- extern VALUE oj_name2class(ParseInfo pi, const char *name, size_t len, int auto_define, VALUE error_class);
12
- extern VALUE oj_name2struct(ParseInfo pi, VALUE nameVal, VALUE error_class);
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);
13
11
 
14
- #endif /* __OJ_RESOLVE_H__ */
12
+ #endif /* OJ_RESOLVE_H */
data/ext/oj/rxclass.c CHANGED
@@ -1,79 +1,76 @@
1
- /* rxclass.c
2
- * Copyright (c) 2017, Peter Ohler
3
- * All rights reserved.
4
- */
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.
5
3
 
6
- #include <sys/types.h>
7
- #include <stdlib.h>
8
4
  #include <errno.h>
9
- #include <string.h>
10
5
  #include <stdio.h>
6
+ #include <stdlib.h>
7
+ #include <string.h>
8
+ #include <sys/types.h>
11
9
  #if !IS_WINDOWS
12
10
  #include <regex.h>
13
11
  #endif
14
12
 
15
13
  #include "rxclass.h"
16
14
 
17
- typedef struct _RxC {
18
- struct _RxC *next;
19
- VALUE rrx;
15
+ typedef struct _rxC {
16
+ struct _rxC *next;
17
+ VALUE rrx;
20
18
  #if !IS_WINDOWS
21
- regex_t rx;
19
+ regex_t rx;
22
20
  #endif
23
- VALUE clas;
24
- char src[256];
25
- } *RxC;
21
+ VALUE clas;
22
+ char src[256];
23
+ } * RxC;
26
24
 
27
- void
28
- oj_rxclass_init(RxClass rc) {
25
+ void oj_rxclass_init(RxClass rc) {
29
26
  *rc->err = '\0';
30
27
  rc->head = NULL;
31
28
  rc->tail = NULL;
32
29
  }
33
30
 
34
- void
35
- oj_rxclass_cleanup(RxClass rc) {
36
- RxC rxc;
31
+ void oj_rxclass_cleanup(RxClass rc) {
32
+ RxC rxc;
37
33
 
38
34
  while (NULL != (rxc = rc->head)) {
39
- rc->head = rc->head->next;
35
+ rc->head = rc->head->next;
40
36
  #if !IS_WINDOWS
41
- if (Qnil == rxc->rrx) {
42
- regfree(&rxc->rx);
43
- }
44
- xfree(rxc);
37
+ if (Qnil == rxc->rrx) {
38
+ regfree(&rxc->rx);
39
+ }
40
+ xfree(rxc);
45
41
  #endif
46
42
  }
47
43
  }
48
44
 
49
- void
50
- oj_rxclass_rappend(RxClass rc, VALUE rx, VALUE clas) {
51
- RxC rxc = ALLOC_N(struct _RxC, 1);
45
+ void oj_rxclass_rappend(RxClass rc, VALUE rx, VALUE clas) {
46
+ RxC rxc = ALLOC_N(struct _rxC, 1);
52
47
 
53
- memset(rxc, 0, sizeof(struct _RxC));
54
- rxc->rrx = rx;
48
+ memset(rxc, 0, sizeof(struct _rxC));
49
+ rxc->rrx = rx;
55
50
  rxc->clas = clas;
56
51
  if (NULL == rc->tail) {
57
- rc->head = rxc;
52
+ rc->head = rxc;
58
53
  } else {
59
- rc->tail->next = rxc;
54
+ rc->tail->next = rxc;
60
55
  }
61
56
  rc->tail = rxc;
62
57
  }
63
58
 
64
59
  // Attempt to compile the expression. If it fails populate the error code..
65
- int
66
- oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
67
- RxC rxc;
60
+ int oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
61
+ RxC rxc;
68
62
  #if !IS_WINDOWS
69
- int err;
70
- int flags = 0;
63
+ int err;
64
+ int flags = 0;
71
65
  #endif
72
66
  if (sizeof(rxc->src) <= strlen(expr)) {
73
- snprintf(rc->err, sizeof(rc->err), "expressions must be less than %lu characters", (unsigned long)sizeof(rxc->src));
74
- return EINVAL;
67
+ snprintf(rc->err,
68
+ sizeof(rc->err),
69
+ "expressions must be less than %lu characters",
70
+ (unsigned long)sizeof(rxc->src));
71
+ return EINVAL;
75
72
  }
76
- rxc = ALLOC_N(struct _RxC, 1);
73
+ rxc = ALLOC_N(struct _rxC, 1);
77
74
  rxc->next = 0;
78
75
  rxc->clas = clas;
79
76
 
@@ -82,15 +79,15 @@ oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
82
79
  #else
83
80
  rxc->rrx = Qnil;
84
81
  if (0 != (err = regcomp(&rxc->rx, expr, flags))) {
85
- regerror(err, &rxc->rx, rc->err, sizeof(rc->err));
86
- free(rxc);
87
- return err;
82
+ regerror(err, &rxc->rx, rc->err, sizeof(rc->err));
83
+ free(rxc);
84
+ return err;
88
85
  }
89
86
  #endif
90
87
  if (NULL == rc->tail) {
91
- rc->head = rxc;
88
+ rc->head = rxc;
92
89
  } else {
93
- rc->tail->next = rxc;
90
+ rc->tail->next = rxc;
94
91
  }
95
92
  rc->tail = rxc;
96
93
 
@@ -99,49 +96,48 @@ oj_rxclass_append(RxClass rc, const char *expr, VALUE clas) {
99
96
 
100
97
  VALUE
101
98
  oj_rxclass_match(RxClass rc, const char *str, int len) {
102
- RxC rxc;
103
- char buf[4096];
104
-
99
+ RxC rxc;
100
+ char buf[4096];
101
+
105
102
  for (rxc = rc->head; NULL != rxc; rxc = rxc->next) {
106
- if (Qnil != rxc->rrx) {
107
- // Must use a valiabel for this to work.
108
- volatile VALUE rstr = rb_str_new(str, len);
109
-
110
- //if (Qtrue == rb_funcall(rxc->rrx, rb_intern("match?"), 1, rstr)) {
111
- if (Qnil != rb_funcall(rxc->rrx, rb_intern("match"), 1, rstr)) {
112
- return rxc->clas;
113
- }
114
- } else if (len < (int)sizeof(buf)) {
103
+ if (Qnil != rxc->rrx) {
104
+ // Must use a valiabel for this to work.
105
+ volatile VALUE rstr = rb_str_new(str, len);
106
+
107
+ // if (Qtrue == rb_funcall(rxc->rrx, rb_intern("match?"), 1, rstr)) {
108
+ if (Qnil != rb_funcall(rxc->rrx, rb_intern("match"), 1, rstr)) {
109
+ return rxc->clas;
110
+ }
111
+ } else if (len < (int)sizeof(buf)) {
115
112
  #if !IS_WINDOWS
116
- // string is not \0 terminated so copy and atempt a match
117
- memcpy(buf, str, len);
118
- buf[len] = '\0';
119
- if (0 == regexec(&rxc->rx, buf, 0, NULL, 0)) { // match
120
- return rxc->clas;
121
- }
113
+ // string is not \0 terminated so copy and attempt a match
114
+ memcpy(buf, str, len);
115
+ buf[len] = '\0';
116
+ if (0 == regexec(&rxc->rx, buf, 0, NULL, 0)) { // match
117
+ return rxc->clas;
118
+ }
122
119
  #endif
123
- } else {
124
- // TBD allocate a larger buffer and attempt
125
- }
120
+ } else {
121
+ // TBD allocate a larger buffer and attempt
122
+ }
126
123
  }
127
124
  return Qnil;
128
125
  }
129
126
 
130
- void
131
- oj_rxclass_copy(RxClass src, RxClass dest) {
127
+ void oj_rxclass_copy(RxClass src, RxClass dest) {
132
128
  dest->head = NULL;
133
129
  dest->tail = NULL;
134
130
  if (NULL != src->head) {
135
- RxC rxc;
131
+ RxC rxc;
136
132
 
137
- for (rxc = src->head; NULL != rxc; rxc = rxc->next) {
138
- if (Qnil != rxc->rrx) {
139
- oj_rxclass_rappend(dest, rxc->rrx, rxc->clas);
140
- } else {
133
+ for (rxc = src->head; NULL != rxc; rxc = rxc->next) {
134
+ if (Qnil != rxc->rrx) {
135
+ oj_rxclass_rappend(dest, rxc->rrx, rxc->clas);
136
+ } else {
141
137
  #if !IS_WINDOWS
142
- oj_rxclass_append(dest, rxc->src, rxc->clas);
138
+ oj_rxclass_append(dest, rxc->src, rxc->clas);
143
139
  #endif
144
- }
145
- }
140
+ }
141
+ }
146
142
  }
147
143
  }
data/ext/oj/rxclass.h CHANGED
@@ -1,27 +1,26 @@
1
- /* rxclass.h
2
- * Copyright (c) 2017, Peter Ohler
3
- * All rights reserved.
4
- */
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.
5
3
 
6
- #ifndef __OJ_RXCLASS_H__
7
- #define __OJ_RXCLASS_H__
4
+ #ifndef OJ_RXCLASS_H
5
+ #define OJ_RXCLASS_H
8
6
 
9
7
  #include <stdbool.h>
8
+
10
9
  #include "ruby.h"
11
10
 
12
- struct _RxC;
11
+ struct _rxC;
13
12
 
14
- typedef struct _RxClass {
15
- struct _RxC *head;
16
- struct _RxC *tail;
17
- char err[128];
18
- } *RxClass;
13
+ typedef struct _rxClass {
14
+ struct _rxC *head;
15
+ struct _rxC *tail;
16
+ char err[128];
17
+ } * RxClass;
19
18
 
20
- extern void oj_rxclass_init(RxClass rc);
21
- extern void oj_rxclass_cleanup(RxClass rc);
22
- extern int oj_rxclass_append(RxClass rc, const char *expr, VALUE clas);
23
- extern VALUE oj_rxclass_match(RxClass rc, const char *str, int len);
24
- extern void oj_rxclass_copy(RxClass src, RxClass dest);
25
- extern void oj_rxclass_rappend(RxClass rc, VALUE rx, VALUE clas);
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);
26
25
 
27
- #endif /* __OJ_RXCLASS_H__ */
26
+ #endif /* OJ_RXCLASS_H */