[pulseaudio-commits] r1530 - /branches/lennart/src/pulsecore/macro.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Jul 25 08:44:29 PDT 2007
Author: lennart
Date: Wed Jul 25 17:44:28 2007
New Revision: 1530
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1530&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Simplify implementation of pa_assert_se()
Modified:
branches/lennart/src/pulsecore/macro.h
Modified: branches/lennart/src/pulsecore/macro.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
macro.h?rev=3D1530&root=3Dpulseaudio&r1=3D1529&r2=3D1530&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/macro.h (original)
+++ branches/lennart/src/pulsecore/macro.h Wed Jul 25 17:44:28 2007
@@ -68,10 +68,11 @@
#define pa_assert_not_reached() pa_assert(!"Should not be reached.")
=
/* An assert which guarantees side effects of x */
-#define pa_assert_se(x) do { \
- int _r =3D !!(x); \
- pa_assert(_r); \
- } while(0)
+#ifdef NDEBUG
+#define pa_assert_se(x) x
+#else
+#define pa_assert_se(x) pa_assert(x)
+#endif
=
#define PA_PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p))
#define PA_UINT_TO_PTR(u) ((void*) (unsigned long) (u))
More information about the pulseaudio-commits
mailing list