summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2005-03-02 22:35:17 +0000
committerKim F. Storm <storm@cua.dk>2005-03-02 22:35:17 +0000
commit139c65cf7b6b0bce5f4cd6e45f450ff4f02d5421 (patch)
tree66535204b83fa57fa71e43ca16d95f202be9754b /src/dispextern.h
parentdb2dacf61063fb315bf68420492567afd593f568 (diff)
downloademacs-139c65cf7b6b0bce5f4cd6e45f450ff4f02d5421.tar.gz
(XASSERTS): Define to 0 if not already defined.
(xassert) [!XASSERTS]: Define dummy version.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index aa296e12340..1d8c1402c81 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -119,6 +119,13 @@ enum window_part
#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 @@ enum window_part
#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