]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace PVEC_FONT as pseudo-vector subtype upper bound
authorMattias Engdegård <mattiase@acm.org>
Sun, 10 Sep 2023 11:24:57 +0000 (13:24 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 10 Sep 2023 12:00:19 +0000 (14:00 +0200)
* src/lisp.h (enum pvec_type): Add PVEC_TAG_MAX.
* src/alloc.c (allocate_pseudovector): Use PVEC_TAG_MAX instead of
PVEC_FONT.

src/alloc.c
src/lisp.h

index c77bdc6372d033a67f48d60011facd4e29e64b3b..c0086a70fc1b6f9bbe766a04ee44cf6176b461b4 100644 (file)
@@ -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);
index 153fb5c0dbc330dc285743a8f3e9b3755d7ad18a..50b68f2e7678833e2b91dfd5dcb0f4aaa9603eaf 100644 (file)
@@ -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