Commit e5aab7e7 authored by Paul Eggert's avatar Paul Eggert
Browse files

* alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.

* lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
avoids undefined behavior in theory.
parent 76ef09b7
2011-03-15 Paul Eggert <eggert@cs.ucla.edu>
 
* alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
* lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
avoids undefined behavior in theory.
* regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
 
Use functions, not macros, for up- and down-casing (Bug#8254).
......@@ -2653,17 +2653,17 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
return val;
}
#ifdef GC_CHECK_CONS_LIST
/* Get an error now if there's any junk in the cons free list. */
void
check_cons_list (void)
{
#ifdef GC_CHECK_CONS_LIST
struct Lisp_Cons *tail = cons_free_list;
while (tail)
tail = tail->u.chain;
#endif
}
#endif
/* Make a list of 1, 2, 3, 4 or 5 specified objects. */
......
......@@ -27,9 +27,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
types of run time checks for Lisp objects. */
#ifdef GC_CHECK_CONS_LIST
#define CHECK_CONS_LIST() check_cons_list()
extern void check_cons_list (void);
#define CHECK_CONS_LIST() check_cons_list ()
#else
#define CHECK_CONS_LIST() ((void)0)
#define CHECK_CONS_LIST() ((void) 0)
#endif
/* These are default choices for the types to use. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment