summaryrefslogtreecommitdiff
path: root/upb/pb/decoder.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/pb/decoder.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/pb/decoder.h')
-rw-r--r--upb/pb/decoder.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h
index c1b6cb3..c645688 100644
--- a/upb/pb/decoder.h
+++ b/upb/pb/decoder.h
@@ -14,6 +14,13 @@
#include "upb/sink.h"
+// The maximum that any submessages can be nested. Matches proto2's limit.
+// At the moment this specifies the size of several statically-sized arrays
+// and therefore setting it high will cause more memory to be used. Will
+// be replaced by a runtime-configurable limit and dynamically-resizing arrays.
+// TODO: make this a runtime-settable property of Decoder.
+#define UPB_DECODER_MAX_NESTING 64
+
#ifdef __cplusplus
namespace upb {
namespace pb {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback