summaryrefslogtreecommitdiff
path: root/upb.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb.h')
-rw-r--r--upb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/upb.h b/upb.h
index 1267662..b7f1f16 100644
--- a/upb.h
+++ b/upb.h
@@ -36,6 +36,8 @@ extern "C" {
/* The maximum number of fields that any one .proto type can have. */
#define UPB_MAX_FIELDS (1<<16)
+#define UPB_INDEX(base, i, m) (void*)((char*)(base) + ((i)*(m)))
+
INLINE uint32_t max(uint32_t a, uint32_t b) { return a > b ? a : b; }
/* 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