From: Mattias EngdegÄrd Date: Sun, 10 Sep 2023 11:24:57 +0000 (+0200) Subject: Replace PVEC_FONT as pseudo-vector subtype upper bound X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90b8762ac84b75e0365aead585752a0a8f682b05;p=emacs.git Replace PVEC_FONT as pseudo-vector subtype upper bound * src/lisp.h (enum pvec_type): Add PVEC_TAG_MAX. * src/alloc.c (allocate_pseudovector): Use PVEC_TAG_MAX instead of PVEC_FONT. --- diff --git a/src/alloc.c b/src/alloc.c index c77bdc6372d..c0086a70fc1 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3613,7 +3613,7 @@ allocate_pseudovector (int memlen, int lisplen, enum { size_max = (1 << PSEUDOVECTOR_SIZE_BITS) - 1 }; enum { rest_max = (1 << PSEUDOVECTOR_REST_BITS) - 1 }; verify (size_max + rest_max <= VECTOR_ELTS_MAX); - eassert (0 <= tag && tag <= PVEC_FONT); + eassert (0 <= tag && tag <= PVEC_TAG_MAX); eassert (0 <= lisplen && lisplen <= zerolen && zerolen <= memlen); eassert (lisplen <= size_max); eassert (memlen <= size_max + rest_max); diff --git a/src/lisp.h b/src/lisp.h index 153fb5c0dbc..50b68f2e767 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1086,7 +1086,8 @@ enum pvec_type PVEC_CHAR_TABLE, PVEC_SUB_CHAR_TABLE, PVEC_RECORD, - PVEC_FONT /* Should be last because it's used for range checking. */ + PVEC_FONT, + PVEC_TAG_MAX = PVEC_FONT /* Keep this equal to the highest member. */ }; enum More_Lisp_Bits