diff options
| author | Ken Raeburn <raeburn@raeburn.org> | 2007-10-29 18:15:02 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@raeburn.org> | 2007-10-29 18:15:02 +0000 |
| commit | 383b707ece960321295197fcb188de9f70010bb6 (patch) | |
| tree | 94e3b8b66dd106c8836525b4b7969a28cd2ff1c3 | |
| parent | c9b3d6a5bb49f365b05712df678ca08882b38a8b (diff) | |
| download | emacs-383b707ece960321295197fcb188de9f70010bb6.tar.gz | |
Comment the ENABLE_CHECKING version of the CHECK macro.
| -rw-r--r-- | src/lisp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 24b908df8e9..89c26b4f1f9 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -84,6 +84,20 @@ extern void die P_((const char *, const char *, int)) NO_RETURN; #ifdef ENABLE_CHECKING +/* The suppress_checking variable is initialized to 0 in alloc.c. Set + it to 1 using a debugger to temporarily disable aborting on + detected internal inconsistencies or error conditions. + + Testing suppress_checking after the supplied condition ensures that + the side effects produced by CHECK will be consistent, independent + of whether ENABLE_CHECKING is defined, or whether the checks are + suppressed at run time. + + In some cases, a good compiler may be able to optimize away the + CHECK macro altogether, e.g., if XSTRING (x) uses CHECK to test + STRINGP (x), but a particular use of XSTRING is invoked only after + testing that STRINGP (x) is true, making the test redundant. */ + #define CHECK(check,msg) (((check) || suppress_checking \ ? (void) 0 \ : die ((msg), __FILE__, __LINE__)), \ |
