From d326277397e345b5bda4a8afbd0a9d54f01b9a06 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Thu, 14 May 2015 18:24:26 -0700 Subject: Update MRI C Ruby extension to use new version of upb. - Alter encode/decode paths to use the `upb_env` (environment) abstraction. - Update upb amalgamation to upstream `93791bfe`. - Fix a compilation warning (void*->char* cast). - Modify build flags so that upb doesn't produce warnings -- the Travis build logs were pretty cluttered previously. --- ruby/ext/google/protobuf_c/protobuf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ruby/ext/google/protobuf_c/protobuf.h') diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 985b7f3d..400909fe 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -511,6 +511,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. -- cgit v1.2.3