[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7a4d9f6: Properly align global lispsym
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] master 7a4d9f6: Properly align global lispsym |
Date: |
Mon, 24 Jul 2017 19:23:35 -0400 (EDT) |
branch: master
commit 7a4d9f6304cffa39642507609605bcbfa40d4675
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>
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.
---
lib-src/make-docfile.c | 4 +++-
src/alloc.c | 2 +-
src/lisp.h | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 6b2cc11..ecd6447 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -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);
}
diff --git a/src/alloc.c b/src/alloc.c
index 2d785d5..2cee646 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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)
{
diff --git a/src/lisp.h b/src/lisp.h
index 9464bf8..cffaf95 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 7a4d9f6: Properly align global lispsym,
Andreas Schwab <=