summaryrefslogtreecommitdiff
path: root/upb/table.int.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb/table.int.h')
-rw-r--r--upb/table.int.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/upb/table.int.h b/upb/table.int.h
index d908196..131a74f 100644
--- a/upb/table.int.h
+++ b/upb/table.int.h
@@ -261,13 +261,18 @@ typedef struct {
} upb_table;
#ifdef NDEBUG
-#define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
- {count, mask, ctype, size_lg2, entries}
+# define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
+ {count, mask, ctype, size_lg2, entries}
#else
+# ifdef UPB_DEBUG_REFS
/* At the moment the only mutable tables we statically initialize are debug
* ref tables. */
-#define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
- {count, mask, ctype, size_lg2, entries, &upb_alloc_debugrefs}
+# define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
+ {count, mask, ctype, size_lg2, entries, &upb_alloc_debugrefs}
+# else
+# define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
+ {count, mask, ctype, size_lg2, entries, NULL}
+# endif
#endif
typedef struct {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback