summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-06 13:41:37 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-06 13:41:37 -0800
commite15f834a916d64b80a0da9cdc4ee0bd4439b6bf4 (patch)
treeabd7dd38ceabf6aa75059551a0d339f6ed45cced /src/upb.h
parent08b4a91204ff7174c381f887d87878d8bb1181ff (diff)
Circular references truly work now, along with a test.
One simplification to come.
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h10
1 files changed, 10 insertions, 0 deletions
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. **************************************/
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback