Commit c1ca42ca authored by Dmitry Antipov's avatar Dmitry Antipov

* alloc.c (valid_lisp_object_p): Treat killed buffers,

buffer_defaults and buffer_local_symbols as valid objects.
Return special value to denote them.
parent e4996ae9
2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
* alloc.c (valid_lisp_object_p): Treat killed buffers,
buffer_defaults and buffer_local_symbols as valid objects.
Return special value to denote them.
2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
......
......@@ -4981,7 +4981,8 @@ valid_pointer_p (void *p)
#endif
}
/* Return 1 if OBJ is a valid lisp object.
/* Return 2 if OBJ is a killed or special buffer object.
Return 1 if OBJ is a valid lisp object.
Return 0 if OBJ is NOT a valid lisp object.
Return -1 if we cannot validate OBJ.
This function can be quite slow,
......@@ -5002,6 +5003,9 @@ valid_lisp_object_p (Lisp_Object obj)
if (PURE_POINTER_P (p))
return 1;
if (p == &buffer_defaults || p == &buffer_local_symbols)
return 2;
#if !GC_MARK_STACK
return valid_pointer_p (p);
#else
......@@ -5027,7 +5031,7 @@ valid_lisp_object_p (Lisp_Object obj)
return 0;
case MEM_TYPE_BUFFER:
return live_buffer_p (m, p);
return live_buffer_p (m, p) ? 1 : 2;
case MEM_TYPE_CONS:
return live_cons_p (m, p);
......
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