[lib] add AUBIO_ASSERT for debug mode
authorPaul Brossier <piem@piem.org>
Sun, 16 Dec 2018 18:11:19 +0000 (19:11 +0100)
committerPaul Brossier <piem@piem.org>
Sun, 16 Dec 2018 18:11:19 +0000 (19:11 +0100)
src/aubio_priv.h

index 589c47a..c26b1f4 100644 (file)
@@ -367,4 +367,11 @@ uint_t aubio_log(sint_t level, const char_t *fmt, ...);
 #endif
 #endif /* __STRICT_ANSI__ */
 
 #endif
 #endif /* __STRICT_ANSI__ */
 
+#if defined(DEBUG)
+#include <assert.h>
+#define AUBIO_ASSERT(x) assert(x)
+#else
+#define AUBIO_ASSERT(x)
+#endif /* DEBUG */
+
 #endif /* AUBIO_PRIV_H */
 #endif /* AUBIO_PRIV_H */