diff options
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index f9a0f958..3d619617 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -507,6 +507,10 @@ VALUE enum_resolve(VALUE self, VALUE sym); const upb_pbdecodermethod *new_fillmsg_decodermethod( Descriptor* descriptor, const void *owner); +// Maximum depth allowed during encoding, to avoid stack overflows due to +// cycles. +#define ENCODE_MAX_NESTING 63 + // ----------------------------------------------------------------------------- // Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor // instances. |