1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

* lisp.h (toplevel): Add compile-time assert to verify suitable member layout

in Lisp_Sub_Char_Table.
This commit is contained in:
Dmitry Antipov 2014-07-02 19:22:49 +04:00
parent 15c1107a30
commit e993f8d5d3
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,8 @@
(enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
Add SUB_CHAR_TABLE_OFFSET member.
(make_uninit_sub_char_table): New function.
(toplevel): Add compile-time assert to verify suitable member layout
in Lisp_Sub_Char_Table.
* alloc.c (mark_char_table): Add extra argument to denote char table
subtype. Adjust to match new layout of sub char-table.
(mark_object): Always mark sub char-tables with mark_char_table.

View File

@ -1561,7 +1561,11 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct)
- CHAR_TABLE_STANDARD_SLOTS);
}
/* Make sure that sub char-table contents slot
is aligned on a multiple of Lisp_Objects. */
verify ((offsetof (struct Lisp_Sub_Char_Table, contents)
- offsetof (struct Lisp_Sub_Char_Table, depth)) % word_size == 0);
/***********************************************************************
Symbols
***********************************************************************/