File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,20 @@ using namespace rapidjson;
18
18
19
19
typedef RubyStringBuffer DefaultBuffer;
20
20
21
- VALUE encode (VALUE _self, VALUE obj) {
21
+ static VALUE
22
+ encode (VALUE _self, VALUE obj) {
22
23
RubyObjectEncoder<DefaultBuffer, Writer<DefaultBuffer> > encoder;
23
24
return encoder.encode (obj);
24
25
}
25
26
26
- VALUE pretty_encode (VALUE _self, VALUE obj) {
27
+ static VALUE
28
+ pretty_encode (VALUE _self, VALUE obj) {
27
29
RubyObjectEncoder<DefaultBuffer, PrettyWriter<DefaultBuffer> > encoder;
28
30
return encoder.encode (obj);
29
31
}
30
32
31
- VALUE parse (VALUE _self, VALUE string) {
33
+ static VALUE
34
+ parse (VALUE _self, VALUE string) {
32
35
RubyObjectHandler handler;
33
36
Reader reader;
34
37
char *cstring = StringValueCStr (string); // fixme?
@@ -43,7 +46,8 @@ VALUE parse(VALUE _self, VALUE string) {
43
46
return handler.GetRoot ();
44
47
}
45
48
46
- VALUE valid_json_p (VALUE _self, VALUE string) {
49
+ static VALUE
50
+ valid_json_p (VALUE _self, VALUE string) {
47
51
NullHandler handler;
48
52
Reader reader;
49
53
char *cstring = StringValueCStr (string); // fixme?
You can’t perform that action at this time.
0 commit comments