changeset 51843:65772ad7d4e1

(mark_object): Mark the new `next' field of overlays. (mark_buffer): Manually mark the overlays_(after|before) fields.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 09 Jul 2003 14:53:41 +0000
parents efecd49d7338
children c5036e7cc93b
files src/alloc.c
diffstat 1 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Wed Jul 09 14:52:55 2003 +0000
+++ b/src/alloc.c	Wed Jul 09 14:53:41 2003 +0000
@@ -5007,8 +5007,12 @@
 	    struct Lisp_Overlay *ptr = XOVERLAY (obj);
 	    mark_object (ptr->start);
 	    mark_object (ptr->end);
-	    obj = ptr->plist;
-	    goto loop;
+	    mark_object (ptr->plist);
+	    if (ptr->next)
+	      {
+		XSETMISC (obj, ptr->next);
+		goto loop;
+	      }
 	  }
 	  break;
 
@@ -5062,7 +5066,7 @@
      Lisp_Object buf;
 {
   register struct buffer *buffer = XBUFFER (buf);
-  register Lisp_Object *ptr;
+  register Lisp_Object *ptr, tmp;
   Lisp_Object base_buffer;
 
   VECTOR_MARK (buffer);
@@ -5105,6 +5109,17 @@
   else
     mark_object (buffer->undo_list);
 
+  if (buffer->overlays_before)
+    {
+      XSETMISC (tmp, buffer->overlays_before);
+      mark_object (tmp);
+    }
+  if (buffer->overlays_after)
+    {
+      XSETMISC (tmp, buffer->overlays_after);
+      mark_object (tmp);
+    }
+
   for (ptr = &buffer->name;
        (char *)ptr < (char *)buffer + sizeof (struct buffer);
        ptr++)