summaryrefslogtreecommitdiff
path: root/src/upb_data.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2010-01-19 10:28:51 -0800
committerJoshua Haberman <joshua@reverberate.org>2010-01-19 10:28:51 -0800
commitdda1499a0eab41165c82277e630dd7050145448f (patch)
tree059f8819c007261279688a5929d007d7b249becf /src/upb_data.h
parent036fe6bb0673930cd5e8450532abe3b7acffb94e (diff)
Add status to the sink interfaces.
Diffstat (limited to 'src/upb_data.h')
-rw-r--r--src/upb_data.h10
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 ****************************************************************/
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback