aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 157d3a1d799..80ab2d2cb97 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4981,7 +4981,8 @@ valid_pointer_p (void *p)
4981#endif 4981#endif
4982} 4982}
4983 4983
4984/* Return 1 if OBJ is a valid lisp object. 4984/* Return 2 if OBJ is a killed or special buffer object.
4985 Return 1 if OBJ is a valid lisp object.
4985 Return 0 if OBJ is NOT a valid lisp object. 4986 Return 0 if OBJ is NOT a valid lisp object.
4986 Return -1 if we cannot validate OBJ. 4987 Return -1 if we cannot validate OBJ.
4987 This function can be quite slow, 4988 This function can be quite slow,
@@ -5002,6 +5003,9 @@ valid_lisp_object_p (Lisp_Object obj)
5002 if (PURE_POINTER_P (p)) 5003 if (PURE_POINTER_P (p))
5003 return 1; 5004 return 1;
5004 5005
5006 if (p == &buffer_defaults || p == &buffer_local_symbols)
5007 return 2;
5008
5005#if !GC_MARK_STACK 5009#if !GC_MARK_STACK
5006 return valid_pointer_p (p); 5010 return valid_pointer_p (p);
5007#else 5011#else
@@ -5027,7 +5031,7 @@ valid_lisp_object_p (Lisp_Object obj)
5027 return 0; 5031 return 0;
5028 5032
5029 case MEM_TYPE_BUFFER: 5033 case MEM_TYPE_BUFFER:
5030 return live_buffer_p (m, p); 5034 return live_buffer_p (m, p) ? 1 : 2;
5031 5035
5032 case MEM_TYPE_CONS: 5036 case MEM_TYPE_CONS:
5033 return live_cons_p (m, p); 5037 return live_cons_p (m, p);