Mercurial > emacs
comparison src/lisp.h @ 85764:e12efff1fa77
Comment the ENABLE_CHECKING version of the CHECK macro.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Mon, 29 Oct 2007 18:15:02 +0000 |
parents | 4f5a9f3d91ae |
children | 1ede747999c6 880960b70474 |
comparison
equal
deleted
inserted
replaced
85763:3b291390be13 | 85764:e12efff1fa77 |
---|---|
81 /* Extra internal type checking? */ | 81 /* Extra internal type checking? */ |
82 extern int suppress_checking; | 82 extern int suppress_checking; |
83 extern void die P_((const char *, const char *, int)) NO_RETURN; | 83 extern void die P_((const char *, const char *, int)) NO_RETURN; |
84 | 84 |
85 #ifdef ENABLE_CHECKING | 85 #ifdef ENABLE_CHECKING |
86 | |
87 /* The suppress_checking variable is initialized to 0 in alloc.c. Set | |
88 it to 1 using a debugger to temporarily disable aborting on | |
89 detected internal inconsistencies or error conditions. | |
90 | |
91 Testing suppress_checking after the supplied condition ensures that | |
92 the side effects produced by CHECK will be consistent, independent | |
93 of whether ENABLE_CHECKING is defined, or whether the checks are | |
94 suppressed at run time. | |
95 | |
96 In some cases, a good compiler may be able to optimize away the | |
97 CHECK macro altogether, e.g., if XSTRING (x) uses CHECK to test | |
98 STRINGP (x), but a particular use of XSTRING is invoked only after | |
99 testing that STRINGP (x) is true, making the test redundant. */ | |
86 | 100 |
87 #define CHECK(check,msg) (((check) || suppress_checking \ | 101 #define CHECK(check,msg) (((check) || suppress_checking \ |
88 ? (void) 0 \ | 102 ? (void) 0 \ |
89 : die ((msg), __FILE__, __LINE__)), \ | 103 : die ((msg), __FILE__, __LINE__)), \ |
90 0) | 104 0) |