[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109889: * alloc.c (valid_lisp_object
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109889: * alloc.c (valid_lisp_object_p): Treat killed buffers, |
Date: |
Wed, 05 Sep 2012 16:55:03 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109889
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2012-09-05 16:55:03 +0400
message:
* alloc.c (valid_lisp_object_p): Treat killed buffers,
buffer_defaults and buffer_local_symbols as valid objects.
Return special value to denote them.
modified:
src/ChangeLog
src/alloc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-05 07:18:46 +0000
+++ b/src/ChangeLog 2012-09-05 12:55:03 +0000
@@ -1,3 +1,9 @@
+2012-09-05 Dmitry Antipov <address@hidden>
+
+ * 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 <address@hidden>
* fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
=== modified file 'src/alloc.c'
--- a/src/alloc.c 2012-09-04 18:29:04 +0000
+++ b/src/alloc.c 2012-09-05 12:55:03 +0000
@@ -4981,7 +4981,8 @@
#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 @@
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 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109889: * alloc.c (valid_lisp_object_p): Treat killed buffers,,
Dmitry Antipov <=