From 26d98ca94f2f049e8767b4a9a33d185a3d7ea0fd Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 24 Oct 2013 12:43:19 -0700 Subject: 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. --- upb/pb/decoder.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'upb/pb/decoder.h') 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 { -- cgit v1.2.3