From: Stefan Monnier Date: Tue, 4 Jul 2023 23:58:12 +0000 (-0400) Subject: Avoid aborts when trying to 'read' sub-char-tables X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a9420c89da925f5a34acfd0a5c016a1de0ea7581;p=emacs.git Avoid aborts when trying to 'read' sub-char-tables * src/data.c (Ftype_of): Support 'sub-char-table'. (Bug#64450) * src/lisp.h: Fix commentary of char-table. --- diff --git a/src/data.c b/src/data.c index 9d7e7effdcd..6de8e0cf1a1 100644 --- a/src/data.c +++ b/src/data.c @@ -269,10 +269,11 @@ for example, (type-of 1) returns `integer'. */) return Qtreesit_compiled_query; case PVEC_SQLITE: return Qsqlite; + case PVEC_SUB_CHAR_TABLE: + return Qsub_char_table; /* "Impossible" cases. */ case PVEC_MISC_PTR: case PVEC_OTHER: - case PVEC_SUB_CHAR_TABLE: case PVEC_FREE: ; } emacs_abort (); @@ -4215,6 +4216,7 @@ syms_of_data (void) DEFSYM (Qvector, "vector"); DEFSYM (Qrecord, "record"); DEFSYM (Qchar_table, "char-table"); + DEFSYM (Qsub_char_table, "sub-char-table"); DEFSYM (Qbool_vector, "bool-vector"); DEFSYM (Qhash_table, "hash-table"); DEFSYM (Qthread, "thread"); diff --git a/src/lisp.h b/src/lisp.h index f10bce86b45..b18d0a69786 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2011,9 +2011,7 @@ ASCII_CHAR_P (intmax_t c) range of characters. A sub-char-table is like a vector, but with two integer fields between the header and Lisp data, which means that it has to be marked with some precautions (see mark_char_table - in alloc.c). A sub-char-table appears only in an element of a - char-table, and there's no way to access it directly from a Lisp - program. */ + in alloc.c). A sub-char-table appears in an element of a char-table. */ enum CHARTAB_SIZE_BITS {