Commit e993f8d5 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

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

in Lisp_Sub_Char_Table.
parent 15c1107a
......@@ -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.
......
......@@ -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
***********************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment