Code

sysdb.h.in: Reintroduced SDB_STATIC_ARRAY_LEN().
authorSebastian Harl <sh@tokkee.org>
Fri, 6 Sep 2013 06:53:38 +0000 (08:53 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 6 Sep 2013 06:53:38 +0000 (08:53 +0200)
Previously only added to the auto-generated sysdb.h :-/ D'oh!

src/include/sysdb.h.in

index 5c26de8794722cd25b7e9fa1eae2e714380c7cf5..67666412416d703450d87fc7a52f0231cba0f37a 100644 (file)
@@ -46,6 +46,8 @@
 #define SDB_VERSION SDB_VERSION_ENCODE(SDB_VERSION_MAJOR, SDB_VERSION_MINOR, \
                SDB_VERSION_PATCH)
 
+#define SDB_STATIC_ARRAY_LEN(a) (sizeof((a)) / sizeof((a)[0]))
+
 #ifdef __cplusplus
 extern "C" {
 #endif