libaacs | branch: master | npzacs <npz...@gmail.com> | Thu Aug 16 15:39:39 2018 +0300| [b47a66bdbfbf384427d79980b7c46e0dc1fa6d15] | committer: npzacs
macro: add assertion macros > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=b47a66bdbfbf384427d79980b7c46e0dc1fa6d15 --- src/util/macro.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util/macro.h b/src/util/macro.h index 3bd155d..b17d729 100644 --- a/src/util/macro.h +++ b/src/util/macro.h @@ -32,4 +32,14 @@ #define BD_MAX_SSIZE ((int64_t)(((size_t)-1)>>1)) +# define BD_ASSERT(p) \ + do { \ + if (!(p)) { \ + BD_DEBUG(DBG_CRIT, "assertion failed: '%s'\n", #p); \ + } \ + } while (0) +# define BD_ASSERT_UNREACHABLE(m) \ + BD_DEBUG(DBG_CRIT, "assertion failed: '%s'\n", m) + + #endif /* MACRO_H_ */ _______________________________________________ libaacs-devel mailing list libaacs-devel@videolan.org https://mailman.videolan.org/listinfo/libaacs-devel