summaryrefslogtreecommitdiff
path: root/innobase/include/univ.i
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/include/univ.i')
-rw-r--r--innobase/include/univ.i3
1 files changed, 3 insertions, 0 deletions
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index 04b254a8221..bc3bd031f0c 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -261,6 +261,9 @@ it is read or written. */
/* Tell the compiler that cond is unlikely to hold */
#define UNIV_UNLIKELY(cond) UNIV_EXPECT(cond, FALSE)
+/* Compile-time constant of the given array's size. */
+#define UT_ARR_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
#include <stdio.h>
#include "ut0dbg.h"
#include "ut0ut.h"