From e15f834a916d64b80a0da9cdc4ee0bd4439b6bf4 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 6 Dec 2009 13:41:37 -0800 Subject: Circular references truly work now, along with a test. One simplification to come. --- src/upb.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/upb.h') diff --git a/src/upb.h b/src/upb.h index 0ee40fb..66706c5 100644 --- a/src/upb.h +++ b/src/upb.h @@ -37,10 +37,20 @@ typedef int16_t upb_field_count_t; // Nested type names are separated by periods. #define UPB_SYMBOL_SEPARATOR '.' +// This limit is for the longest fully-qualified symbol, eg. foo.bar.MsgType #define UPB_SYMBOL_MAXLEN 128 #define UPB_INDEX(base, i, m) (void*)((char*)(base) + ((i)*(m))) +// The longest chain that mutually-recursive types are allowed to form. For +// example, this is a type cycle of length 2: +// message A { +// B b = 1; +// } +// message B { +// A a = 1; +// } +#define UPB_MAX_TYPE_CYCLE_LEN 16 /* Fundamental types and type constants. **************************************/ -- cgit v1.2.3