diff options
author | Josh Haberman <jhaberman@gmail.com> | 2013-10-24 12:43:19 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2013-10-24 12:43:19 -0700 |
commit | 26d98ca94f2f049e8767b4a9a33d185a3d7ea0fd (patch) | |
tree | 340bcf495f06ed05c9f3fb423f210caf4edce2b1 /upb/sink.h | |
parent | 61109fca1f967771c21dc7184aee35f3b439c577 (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.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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(); |