From 6aea75280281ab89266e7835655f2a551efd81b2 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 10 Oct 2012 19:31:21 +0400 Subject: [PATCH] * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR. * lisp.h (enum pvec_type): Adjust comments and omit explicit initializer for PVEC_NORMAL_VECTOR. --- src/ChangeLog | 6 ++++++ src/alloc.c | 2 +- src/lisp.h | 10 +++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b1aea7307ae..98433493475 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-10-10 Dmitry Antipov + + * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR. + * lisp.h (enum pvec_type): Adjust comments and omit explicit + initializer for PVEC_NORMAL_VECTOR. + 2012-10-10 Paul Eggert Clean out old termopts cruft. diff --git a/src/alloc.c b/src/alloc.c index 0cbdef84c4a..95be8db1614 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5689,7 +5689,7 @@ mark_object (Lisp_Object arg) pvectype = ((ptr->header.size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_SIZE_BITS); else - pvectype = 0; + pvectype = PVEC_NORMAL_VECTOR; if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER) CHECK_LIVE (live_vector_p); diff --git a/src/lisp.h b/src/lisp.h index 2a647e593a8..71e542cc769 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -345,15 +345,11 @@ static ptrdiff_t const PSEUDOVECTOR_FLAG = PSEUDOVECTOR_FLAG; /* In a pseudovector, the size field actually contains a word with one - PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to - indicate the actual type. - We use a bitset, even tho only one of the bits can be set at any - particular time just so as to be able to use micro-optimizations such as - testing membership of a particular subset of pseudovectors in Fequal. - It is not crucial, but there are plenty of bits here, so why not do it? */ + PSEUDOVECTOR_FLAG bit set, and one of the following values extracted + with PVEC_TYPE_MASK to indicate the actual type. */ enum pvec_type { - PVEC_NORMAL_VECTOR = 0, /* Unused! */ + PVEC_NORMAL_VECTOR, PVEC_FREE, PVEC_PROCESS, PVEC_FRAME, -- 2.39.2