From 651c92ab33187b34d7878ac57427bbbc062662fa Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 5 Dec 2009 18:06:50 -0800 Subject: Scheme for collecting circular refs. "make descriptorgen" is now valgrind-clean again. --- src/upb.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/upb.h') diff --git a/src/upb.h b/src/upb.h index ff7c86e..0ee40fb 100644 --- a/src/upb.h +++ b/src/upb.h @@ -29,8 +29,11 @@ extern "C" { // The maximum that any submessages can be nested. Matches proto2's limit. #define UPB_MAX_NESTING 64 -// The maximum number of fields that any one .proto type can have. -#define UPB_MAX_FIELDS (1<<16) +// The maximum number of fields that any one .proto type can have. Note that +// this is very different than the max field number. It is hard to imagine a +// scenario where more than 32k fields makes sense. +#define UPB_MAX_FIELDS (1<<15) +typedef int16_t upb_field_count_t; // Nested type names are separated by periods. #define UPB_SYMBOL_SEPARATOR '.' -- cgit v1.2.3