emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/marker.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/marker.c,v
Date: Tue, 02 Oct 2007 21:05:40 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/10/02 21:05:40

Index: marker.c
===================================================================
RCS file: /sources/emacs/emacs/src/marker.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- marker.c    26 Jul 2007 05:27:55 -0000      1.51
+++ marker.c    2 Oct 2007 21:05:39 -0000       1.52
@@ -452,8 +452,11 @@
   if (XMARKER (marker)->buffer)
     {
       XSETBUFFER (buf, XMARKER (marker)->buffer);
-      /* Return marker's buffer only if it is not dead.  */
-      if (!NILP (XBUFFER (buf)->name))
+      /* If the buffer is dead, we're in trouble: the buffer pointer here
+        does not preserve the buffer from being GC'd (it's weak), so
+        markers have to be unlinked from their buffer as soon as the buffer
+        is killed.  */
+      eassert (!NILP (XBUFFER (buf)->name));
        return buf;
     }
   return Qnil;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]