On Fri, Oct 01, 2010 at 12:01:40AM +0200, Reimar D?ffinger wrote:
On Thu, Sep 30, 2010 at 11:57:31PM +0200, michael wrote:
+/** + * assert() equivalent, that is always enabled. + */ +#define av_assert0(cond) do {if(!(cond)) { av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", AV_STRINGIFY(cond), __FILE__, __LINE__); abort(); }}while(0) + + +/** + * assert() equivalent, that does not lie in speed critical code. + * These asserts() thus can be enabled without fearing speedloss. + */ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0 +#define av_assert1(cond) av_assert_always(cond) +#else +#define av_assert1(cond) ((void)0) +#endif
Huh? Did you mean av_assert0 instead of av_assert_always?
yes, fixed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I wish the Xiph folks would stop pretending they've got something they do not. Somehow I fear this will remain a wish. -- M?ns Rullg?rd