summaryrefslogtreecommitdiff
path: root/upb/sink.h
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2013-10-24 12:43:19 -0700
committerJosh Haberman <jhaberman@gmail.com>2013-10-24 12:43:19 -0700
commit26d98ca94f2f049e8767b4a9a33d185a3d7ea0fd (patch)
tree340bcf495f06ed05c9f3fb423f210caf4edce2b1 /upb/sink.h
parent61109fca1f967771c21dc7184aee35f3b439c577 (diff)
Merge from Google-internal development:
- rewritten decoder; interpreted decoder is bytecode-based, JIT decoder no longer falls back to the interpreter. - C++ improvements: C++11-compatible iterators, upb::reffed_ptr for RAII refcounting, better upcast/downcast support. - removed the gross upb_value abstraction from public upb.h.
Diffstat (limited to 'upb/sink.h')
-rw-r--r--upb/sink.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/upb/sink.h b/upb/sink.h
index bf88222..27e9fd2 100644
--- a/upb/sink.h
+++ b/upb/sink.h
@@ -38,6 +38,10 @@ typedef struct upb_sink upb_sink;
#endif
struct upb_sinkframe;
+// The maximum nesting depth that upb::Sink will allow. Matches proto2's limit.
+// TODO: make this a runtime-settable property of Sink.
+#define UPB_SINK_MAX_NESTING 64
+
#ifdef __cplusplus
// A upb::Pipeline is a set of sinks that can send data to each other. The
@@ -168,7 +172,14 @@ class upb::Sink {
// These may not be called from within one of the same sink's handlers (in
// other words, handlers are not re-entrant).
- // Should be called at the start and end of processing.
+ // Should be called at the start and end of every message; both the top-level
+ // message and submessages. This means that submessages should use the
+ // following sequence:
+ // sink->StartSubMessage(startsubmsg_selector);
+ // sink->StartMessage();
+ // // ...
+ // sink->EndMessage();
+ // sink->EndSubMessage(endsubmsg_selector);
bool StartMessage();
bool EndMessage();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback