aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 3a9dcc3c59d..a7780e9ad91 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2087,8 +2087,8 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2087 XSETCONS (val, &cons_block->conses[cons_block_index++]); 2087 XSETCONS (val, &cons_block->conses[cons_block_index++]);
2088 } 2088 }
2089 2089
2090 XCAR (val) = car; 2090 XSETCAR (val, car);
2091 XCDR (val) = cdr; 2091 XSETCDR (val, cdr);
2092 consing_since_gc += sizeof (struct Lisp_Cons); 2092 consing_since_gc += sizeof (struct Lisp_Cons);
2093 cons_cells_consed++; 2093 cons_cells_consed++;
2094 return val; 2094 return val;
@@ -3878,8 +3878,8 @@ pure_cons (car, cdr)
3878 3878
3879 p = (struct Lisp_Cons *) pure_alloc (sizeof *p, Lisp_Cons); 3879 p = (struct Lisp_Cons *) pure_alloc (sizeof *p, Lisp_Cons);
3880 XSETCONS (new, p); 3880 XSETCONS (new, p);
3881 XCAR (new) = Fpurecopy (car); 3881 XSETCAR (new, Fpurecopy (car));
3882 XCDR (new) = Fpurecopy (cdr); 3882 XSETCDR (new, Fpurecopy (cdr));
3883 return new; 3883 return new;
3884} 3884}
3885 3885
@@ -4189,7 +4189,10 @@ Garbage collection happens automatically if you cons more than
4189 if (NILP (prev)) 4189 if (NILP (prev))
4190 nextb->undo_list = tail = XCDR (tail); 4190 nextb->undo_list = tail = XCDR (tail);
4191 else 4191 else
4192 tail = XCDR (prev) = XCDR (tail); 4192 {
4193 tail = XCDR (tail);
4194 XSETCDR (prev, tail);
4195 }
4193 } 4196 }
4194 else 4197 else
4195 { 4198 {
@@ -4800,8 +4803,8 @@ mark_buffer (buf)
4800 && ! XMARKBIT (XCAR (ptr->car)) 4803 && ! XMARKBIT (XCAR (ptr->car))
4801 && GC_MARKERP (XCAR (ptr->car))) 4804 && GC_MARKERP (XCAR (ptr->car)))
4802 { 4805 {
4803 XMARK (XCAR (ptr->car)); 4806 XMARK (XCAR_AS_LVALUE (ptr->car));
4804 mark_object (&XCDR (ptr->car)); 4807 mark_object (&XCDR_AS_LVALUE (ptr->car));
4805 } 4808 }
4806 else 4809 else
4807 mark_object (&ptr->car); 4810 mark_object (&ptr->car);
@@ -4812,7 +4815,7 @@ mark_buffer (buf)
4812 break; 4815 break;
4813 } 4816 }
4814 4817
4815 mark_object (&XCDR (tail)); 4818 mark_object (&XCDR_AS_LVALUE (tail));
4816 } 4819 }
4817 else 4820 else
4818 mark_object (&buffer->undo_list); 4821 mark_object (&buffer->undo_list);