projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cef305
)
Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 28 Feb 2017 21:25:51 +0000
(
00:25
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 28 Feb 2017 21:25:51 +0000
(
00:25
+0300)
* include/gc_inline.h [!GC_ASSERT && !NDEBUG] (GC_ASSERT): Define as
assert(x); include assert.h.
include/gc_inline.h
patch
|
blob
|
history
diff --git
a/include/gc_inline.h
b/include/gc_inline.h
index
71f9f90
..
177ab00
100644
(file)
--- a/
include/gc_inline.h
+++ b/
include/gc_inline.h
@@
-39,7
+39,12
@@
#endif /* __GNUC__ */
#ifndef GC_ASSERT
-# define GC_ASSERT(expr) /* empty */
+# ifdef NDEBUG
+# define GC_ASSERT(expr) /* empty */
+# else
+# include <assert.h>
+# define GC_ASSERT(expr) assert(expr)
+# endif
#endif
#ifndef GC_PREFETCH_FOR_WRITE