changeset 60346:70a63281c541

(XASSERTS): Define to 0 if not already defined. (xassert) [!XASSERTS]: Define dummy version.
author Kim F. Storm <storm@cua.dk>
date Wed, 02 Mar 2005 22:35:17 +0000
parents 25144f57ab31
children 3375018deeb3 e4694597cbf4
files src/dispextern.h
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispextern.h	Wed Mar 02 22:34:47 2005 +0000
+++ b/src/dispextern.h	Wed Mar 02 22:35:17 2005 +0000
@@ -119,6 +119,13 @@
 #define GLYPH_DEBUG 0
 #endif
 
+/* If XASSERTS is non-zero, additional consistency checks are activated.
+   Turn it off by defining the macro XASSERTS to zero.  */
+
+#ifndef XASSERTS
+#define XASSERTS 0
+#endif
+
 /* Macros to include code only if GLYPH_DEBUG != 0.  */
 
 #if GLYPH_DEBUG
@@ -127,8 +134,11 @@
 #define IF_DEBUG(X)	(void) 0
 #endif
 
-/* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release.  */
+#if XASSERTS
 #define xassert(X)	do {if (!(X)) abort ();} while (0)
+#else
+#define xassert(X)	(void) 0
+#endif
 
 /* Macro for displaying traces of redisplay.  If Emacs was compiled
    with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to