From: Ivan Maidanski Date: Tue, 28 Feb 2017 21:25:51 +0000 (+0300) Subject: Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h X-Git-Tag: v8.0.0~900 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0db1e6261480b5c01720cd92c407ac02ead31835;p=gc Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h * include/gc_inline.h [!GC_ASSERT && !NDEBUG] (GC_ASSERT): Define as assert(x); include assert.h. --- diff --git a/include/gc_inline.h b/include/gc_inline.h index 71f9f904..177ab00f 100644 --- 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 +# define GC_ASSERT(expr) assert(expr) +# endif #endif #ifndef GC_PREFETCH_FOR_WRITE