diff options
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 21c7f001..1291ac59 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -475,8 +475,20 @@ VALUE layout_inspect(MessageLayout* layout, void* storage); // Message class creation. // ----------------------------------------------------------------------------- +// This should probably be factored into a common upb component. + +typedef struct { + upb_byteshandler handler; + upb_bytessink sink; + char *ptr; + size_t len, size; +} stringsink; + +void stringsink_uninit(stringsink *sink); + struct MessageHeader { - Descriptor* descriptor; // kept alive by self.class.descriptor reference. + Descriptor* descriptor; // kept alive by self.class.descriptor reference. + stringsink* unknown_fields; // store unknown fields in decoding. // Data comes after this. }; |