diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-12-07 14:18:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-07 14:18:38 -0800 |
commit | 0e7b58956684c7c2fc228eff9173ea2ae50de911 (patch) | |
tree | dd44fc86e270993b176a6f315fc2ac67dccda855 /ruby/ext/google/protobuf_c/protobuf.h | |
parent | c370f88fb18eecc33650ec3ce06f7bdcc11d1596 (diff) | |
download | protobuf-0e7b58956684c7c2fc228eff9173ea2ae50de911.tar.gz protobuf-0e7b58956684c7c2fc228eff9173ea2ae50de911.tar.bz2 protobuf-0e7b58956684c7c2fc228eff9173ea2ae50de911.zip |
Add discard unknown API in ruby. (#3990)
* Add discard unknown API in ruby.
* Add test for oneof message field.
* Add TestUnknown to represent unknown field data clearly.
* Only serialize the message with unknown fields itself in test.
* Move discard_unknown from Message to Google.Protobuf
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 1291ac59..5266aa8d 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -515,6 +515,7 @@ VALUE Message_encode(VALUE klass, VALUE msg_rb); VALUE Message_decode_json(VALUE klass, VALUE data); VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass); +VALUE Google_Protobuf_discard_unknown(VALUE self, VALUE msg_rb); VALUE Google_Protobuf_deep_copy(VALUE self, VALUE obj); VALUE build_module_from_enumdesc(EnumDescriptor* enumdef); |