summaryrefslogtreecommitdiff
path: root/upb/pb/decoder.h
diff options
context:
space:
mode:
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