diff options
author | Chris Fallin <cfallin@google.com> | 2015-05-14 18:24:26 -0700 |
---|---|---|
committer | Chris Fallin <cfallin@google.com> | 2015-05-15 11:36:12 -0700 |
commit | d326277397e345b5bda4a8afbd0a9d54f01b9a06 (patch) | |
tree | 06374379f0c2290e69110c787a5ad347e262eac6 /ruby/ext/google/protobuf_c/protobuf.h | |
parent | b481a4f920d2f5872bc1e9bfd6b0656f6ad0b713 (diff) | |
download | protobuf-d326277397e345b5bda4a8afbd0a9d54f01b9a06.tar.gz protobuf-d326277397e345b5bda4a8afbd0a9d54f01b9a06.tar.bz2 protobuf-d326277397e345b5bda4a8afbd0a9d54f01b9a06.zip |
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.
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 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. |