Properly align global lispsym
* lib-src/make-docfile.c (close_emacs_globals): Wrap struct Lisp_Symbols inside struct. * src/alloc.c (sweep_symbols): Update use of lispsym. * src/lisp.h (builtin_lisp_symbol): Likewise.
This commit is contained in:
parent
b46a02eda4
commit
7a4d9f6304
3 changed files with 6 additions and 4 deletions
|
@ -667,7 +667,9 @@ close_emacs_globals (ptrdiff_t num_symbols)
|
|||
"#ifndef DEFINE_SYMBOLS\n"
|
||||
"extern\n"
|
||||
"#endif\n"
|
||||
"struct Lisp_Symbol alignas (GCALIGNMENT) lispsym[%td];\n"),
|
||||
"struct {\n"
|
||||
" struct Lisp_Symbol alignas (GCALIGNMENT) s;\n"
|
||||
"} lispsym[%td];\n"),
|
||||
num_symbols);
|
||||
}
|
||||
|
||||
|
|
|
@ -6943,7 +6943,7 @@ sweep_symbols (void)
|
|||
symbol_free_list = NULL;
|
||||
|
||||
for (int i = 0; i < ARRAYELTS (lispsym); i++)
|
||||
lispsym[i].gcmarkbit = 0;
|
||||
lispsym[i].s.gcmarkbit = 0;
|
||||
|
||||
for (sblk = symbol_block; sblk; sblk = *sprev)
|
||||
{
|
||||
|
|
|
@ -838,13 +838,13 @@ make_lisp_symbol (struct Lisp_Symbol *sym)
|
|||
INLINE Lisp_Object
|
||||
builtin_lisp_symbol (int index)
|
||||
{
|
||||
return make_lisp_symbol (lispsym + index);
|
||||
return make_lisp_symbol (&lispsym[index].s);
|
||||
}
|
||||
|
||||
INLINE void
|
||||
(CHECK_SYMBOL) (Lisp_Object x)
|
||||
{
|
||||
lisp_h_CHECK_SYMBOL (x);
|
||||
lisp_h_CHECK_SYMBOL (x);
|
||||
}
|
||||
|
||||
/* In the size word of a vector, this bit means the vector has been marked. */
|
||||
|
|
Loading…
Add table
Reference in a new issue