diff options
Diffstat (limited to 'src/upb_data.h')
-rw-r--r-- | src/upb_data.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/upb_data.h b/src/upb_data.h index 2d2f402..cdb7af2 100644 --- a/src/upb_data.h +++ b/src/upb_data.h @@ -509,18 +509,24 @@ INLINE void upb_msg_clear(upb_msg *msg, upb_msgdef *md) { memset(msg->data, 0, md->set_flags_bytes); } -// A convenience function for parsing an entire protobuf all at once, without +// A convenience function for decoding an entire protobuf all at once, without // having to worry about setting up the appropriate objects. void upb_msg_decodestr(upb_msg *msg, upb_msgdef *md, upb_strptr str, upb_status *status); +// A convenience function for encoding an entire protobuf all at once. If an +// error occurs, the null string is returned and the status object contains +// the error. +void upb_msg_encodestr(upb_msg *msg, upb_msgdef *md, upb_strptr str, + upb_status *status); + /* upb_msgsrc *****************************************************************/ // A nonresumable, non-interruptable (but simple and fast) source for pushing // the data of a upb_msg to a upb_sink. void upb_msgsrc_produce(upb_msg *msg, upb_msgdef *md, upb_sink *sink, - bool reverse); + bool reverse, upb_status *status); /* upb_msgsink ****************************************************************/ |