summaryrefslogtreecommitdiffstats
path: root/libdimension/compiler.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-01-30 03:33:05 -0500
committerTavian Barnes <tavianator@gmail.com>2011-01-30 03:33:05 -0500
commit20af6f3fe1921987c236a1b6662ee16efaae7be0 (patch)
treec76fcedd39810bdc1a1ec8b44506bb6c65c21882 /libdimension/compiler.h
parentb2ffd0909e3f5ff6c86ba7d0b37f4c8cf0af8143 (diff)
downloaddimension-20af6f3fe1921987c236a1b6662ee16efaae7be0.tar.xz
Use the DMNSN_PROFILE macro to turn on profiling per-file.
Diffstat (limited to 'libdimension/compiler.h')
-rw-r--r--libdimension/compiler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdimension/compiler.h b/libdimension/compiler.h
index b1cf60c..d05d775 100644
--- a/libdimension/compiler.h
+++ b/libdimension/compiler.h
@@ -28,11 +28,11 @@
#include <stdbool.h>
-#if DMNSN_PROFILE
+#ifdef DMNSN_PROFILE
#define dmnsn_likely(test) \
- dmnsn_expect((test), true, DMNSN_FUNC, __FILE__, __LINE__)
+ dmnsn_expect(!!(test), true, DMNSN_FUNC, __FILE__, __LINE__)
#define dmnsn_unlikely(test) \
- dmnsn_expect((test), false, DMNSN_FUNC, __FILE__, __LINE__)
+ dmnsn_expect(!!(test), false, DMNSN_FUNC, __FILE__, __LINE__)
#elif defined(__GNUC__)
#define dmnsn_likely(test) __builtin_expect(!!(test), true)
#define dmnsn_unlikely(test) __builtin_expect(!!(test), false)