summaryrefslogtreecommitdiff
path: root/upb/descriptor/reader.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb/descriptor/reader.h')
-rw-r--r--upb/descriptor/reader.h12
1 files changed, 12 insertions, 0 deletions
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 {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback