summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-06 16:29:29 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-06 16:29:29 -0800
commit0a6fc5fad3cee99bf4da97214a2ca3deccc9b132 (patch)
treeac53bb8bfb492f97524b968ab1859dd9003c165e /src/upb.h
parente15f834a916d64b80a0da9cdc4ee0bd4439b6bf4 (diff)
Truly fixed type cyclic refcounting.
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/upb.h b/src/upb.h
index 66706c5..237281f 100644
--- a/src/upb.h
+++ b/src/upb.h
@@ -25,6 +25,7 @@ extern "C" {
#define UPB_MAX(x, y) ((x) > (y) ? (x) : (y))
#define UPB_MIN(x, y) ((x) < (y) ? (x) : (y))
+#define UPB_INDEX(base, i, m) (void*)((char*)(base) + ((i)*(m)))
// The maximum that any submessages can be nested. Matches proto2's limit.
#define UPB_MAX_NESTING 64
@@ -37,11 +38,10 @@ 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 {
@@ -52,6 +52,9 @@ typedef int16_t upb_field_count_t;
// }
#define UPB_MAX_TYPE_CYCLE_LEN 16
+// The maximum depth that the type graph can have.
+#define UPB_MAX_TYPE_DEPTH 64
+
/* Fundamental types and type constants. **************************************/
// A list of types as they are encoded on-the-wire.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback