X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/84575e67fc390815f8f9fc8bea095e006f0890c4..657e54f709cb435a5ca93f0184e214dd9e586f29:/src/chartab.c diff --git a/src/chartab.c b/src/chartab.c index 1c76e5a21e..2a8bbc6983 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -128,7 +128,7 @@ the char-table has no extra slot. */) n_extras = XINT (n); } - size = VECSIZE (struct Lisp_Char_Table) - 1 + n_extras; + size = CHAR_TABLE_STANDARD_SLOTS + n_extras; vector = Fmake_vector (make_number (size), init); XSETPVECTYPE (XVECTOR (vector), PVEC_CHAR_TABLE); set_char_table_parent (vector, Qnil); @@ -141,7 +141,8 @@ static Lisp_Object make_sub_char_table (int depth, int min_char, Lisp_Object defalt) { Lisp_Object table; - int size = VECSIZE (struct Lisp_Sub_Char_Table) - 1 + chartab_size[depth]; + int size = (PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) + + chartab_size[depth]); table = Fmake_vector (make_number (size), defalt); XSETPVECTYPE (XVECTOR (table), PVEC_SUB_CHAR_TABLE); @@ -207,7 +208,7 @@ copy_char_table (Lisp_Object table) ? copy_sub_char_table (XCHAR_TABLE (table)->contents[i]) : XCHAR_TABLE (table)->contents[i])); set_char_table_ascii (copy, char_table_ascii (copy)); - size -= VECSIZE (struct Lisp_Char_Table) - 1; + size -= CHAR_TABLE_STANDARD_SLOTS; for (i = 0; i < size; i++) set_char_table_extras (copy, i, XCHAR_TABLE (table)->extras[i]); @@ -1271,7 +1272,7 @@ uniprop_encode_value_run_length (Lisp_Object table, Lisp_Object value) /* Encode VALUE as an element of char-table TABLE which adopts RUN-LENGTH - compression and contains numbers as elements . */ + compression and contains numbers as elements. */ static Lisp_Object uniprop_encode_value_numeric (Lisp_Object table, Lisp_Object value)