summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
committerMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
commit9c8020a8df03dc67a56d7df15664dcf7ace54bf0 (patch)
tree09b0646addff3c39f9e96ba89c04bdcc038a87a7 /src/alloc.c
parentdfc3268dfa133a2e0a677f1af7c1ee548eae065d (diff)
parentbd3164743080f3eb5fc316aca7cc5322ca58fe33 (diff)
downloademacs-9c8020a8df03dc67a56d7df15664dcf7ace54bf0.tar.gz
emacs-9c8020a8df03dc67a56d7df15664dcf7ace54bf0.tar.bz2
emacs-9c8020a8df03dc67a56d7df15664dcf7ace54bf0.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 890-898) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 122-128) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 257-258) - Merge from emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/alloc.c b/src/alloc.c
index ed003af3ea8..295da59d026 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1153,6 +1153,8 @@ allocate_buffer ()
struct buffer *b
= (struct buffer *) lisp_malloc (sizeof (struct buffer),
MEM_TYPE_BUFFER);
+ b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
+ XSETPVECTYPE (b, PVEC_BUFFER);
return b;
}
@@ -3307,7 +3309,7 @@ allocate_misc ()
--total_free_markers;
consing_since_gc += sizeof (union Lisp_Misc);
misc_objects_consed++;
- XMARKER (val)->gcmarkbit = 0;
+ XMISCANY (val)->gcmarkbit = 0;
return val;
}
@@ -3317,7 +3319,7 @@ void
free_misc (misc)
Lisp_Object misc;
{
- XMISC (misc)->u_marker.type = Lisp_Misc_Free;
+ XMISCTYPE (misc) = Lisp_Misc_Free;
XMISC (misc)->u_free.chain = marker_free_list;
marker_free_list = XMISC (misc);
@@ -4033,7 +4035,7 @@ live_misc_p (m, p)
&& offset < (MARKER_BLOCK_SIZE * sizeof b->markers[0])
&& (b != marker_block
|| offset / sizeof b->markers[0] < marker_block_index)
- && ((union Lisp_Misc *) p)->u_marker.type != Lisp_Misc_Free);
+ && ((union Lisp_Misc *) p)->u_any.type != Lisp_Misc_Free);
}
else
return 0;
@@ -4164,7 +4166,7 @@ mark_maybe_object (obj)
break;
case Lisp_Misc:
- mark_p = (live_misc_p (m, po) && !XMARKER (obj)->gcmarkbit);
+ mark_p = (live_misc_p (m, po) && !XMISCANY (obj)->gcmarkbit);
break;
case Lisp_Int:
@@ -5613,14 +5615,13 @@ mark_object (arg)
case Lisp_Misc:
CHECK_ALLOCATED_AND_LIVE (live_misc_p);
- if (XMARKER (obj)->gcmarkbit)
+ if (XMISCANY (obj)->gcmarkbit)
break;
- XMARKER (obj)->gcmarkbit = 1;
+ XMISCANY (obj)->gcmarkbit = 1;
switch (XMISCTYPE (obj))
{
case Lisp_Misc_Buffer_Local_Value:
- case Lisp_Misc_Some_Buffer_Local_Value:
{
register struct Lisp_Buffer_Local_Value *ptr
= XBUFFER_LOCAL_VALUE (obj);
@@ -5806,7 +5807,7 @@ survives_gc_p (obj)
break;
case Lisp_Misc:
- survives_p = XMARKER (obj)->gcmarkbit;
+ survives_p = XMISCANY (obj)->gcmarkbit;
break;
case Lisp_String:
@@ -6103,9 +6104,9 @@ gc_sweep ()
for (i = 0; i < lim; i++)
{
- if (!mblk->markers[i].u_marker.gcmarkbit)
+ if (!mblk->markers[i].u_any.gcmarkbit)
{
- if (mblk->markers[i].u_marker.type == Lisp_Misc_Marker)
+ if (mblk->markers[i].u_any.type == Lisp_Misc_Marker)
unchain_marker (&mblk->markers[i].u_marker);
/* Set the type of the freed object to Lisp_Misc_Free.
We could leave the type alone, since nobody checks it,
@@ -6118,7 +6119,7 @@ gc_sweep ()
else
{
num_used++;
- mblk->markers[i].u_marker.gcmarkbit = 0;
+ mblk->markers[i].u_any.gcmarkbit = 0;
}
}
lim = MARKER_BLOCK_SIZE;
@@ -6256,7 +6257,7 @@ die (msg, file, line)
const char *file;
int line;
{
- fprintf (stderr, "\r\nEmacs fatal error: %s:%d: %s\r\n",
+ fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n",
file, line, msg);
abort ();
}