diff options
Diffstat (limited to 'upb/descriptor/reader.h')
-rw-r--r-- | upb/descriptor/reader.h | 12 |
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 { |