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;
1818
1919typedef RubyStringBuffer DefaultBuffer;
2020
21- VALUE encode (VALUE _self, VALUE obj) {
21+ static VALUE
22+ encode (VALUE _self, VALUE obj) {
2223 RubyObjectEncoder<DefaultBuffer, Writer<DefaultBuffer> > encoder;
2324 return encoder.encode (obj);
2425}
2526
26- VALUE pretty_encode (VALUE _self, VALUE obj) {
27+ static VALUE
28+ pretty_encode (VALUE _self, VALUE obj) {
2729 RubyObjectEncoder<DefaultBuffer, PrettyWriter<DefaultBuffer> > encoder;
2830 return encoder.encode (obj);
2931}
3032
31- VALUE parse (VALUE _self, VALUE string) {
33+ static VALUE
34+ parse (VALUE _self, VALUE string) {
3235 RubyObjectHandler handler;
3336 Reader reader;
3437 char *cstring = StringValueCStr (string); // fixme?
@@ -43,7 +46,8 @@ VALUE parse(VALUE _self, VALUE string) {
4346 return handler.GetRoot ();
4447}
4548
46- VALUE valid_json_p (VALUE _self, VALUE string) {
49+ static VALUE
50+ valid_json_p (VALUE _self, VALUE string) {
4751 NullHandler handler;
4852 Reader reader;
4953 char *cstring = StringValueCStr (string); // fixme?
You can’t perform that action at this time.
0 commit comments