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/descriptor/reader.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'upb/descriptor/reader.h') diff --git a/upb/descriptor/reader.h b/upb/descriptor/reader.h index b7c7d8b..d00830b 100644 --- a/upb/descriptor/reader.h +++ b/upb/descriptor/reader.h @@ -13,6 +13,18 @@ #include "upb/handlers.h" +// The maximum number of nested declarations that are allowed, ie. +// message Foo { +// message Bar { +// message Baz { +// } +// } +// } +// +// This is a resource limit that affects how big our runtime stack can grow. +// TODO: make this a runtime-settable property of the Reader instance. +#define UPB_MAX_MESSAGE_NESTING 64 + #ifdef __cplusplus namespace upb { namespace descriptor { -- cgit v1.2.3