aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2015-01-10 13:33:38 -0800
committerPaul Eggert2015-01-10 13:42:35 -0800
commit6a37ecee0884ff30ac7666e6502e2a9d2608f291 (patch)
tree875bd8310981ff850911f04da4c3c3b95f34537b /src/alloc.c
parent649937920b5023be5c0685d1537f5ea2bfb9899a (diff)
downloademacs-6a37ecee0884ff30ac7666e6502e2a9d2608f291.tar.gz
emacs-6a37ecee0884ff30ac7666e6502e2a9d2608f291.zip
Port to 32-bit --with-wide-int
Prefer symbol indexes to struct Lisp_Symbol * casted and then widened, as the latter had trouble with GCC on Fedora 21 when configured --with-wide-int and when used in static initializers. * lib-src/make-docfile.c (write_globals): Define and use symbols like iQnil (a small integer, like 0) rather than aQnil (an address constant). * src/alloc.c (garbage_collect_1, which_symbols): * src/lread.c (init_obarray): Prefer builtin_lisp_symbol when it can be used. * src/dispextern.h (struct image_type.type): * src/font.c (font_property_table.key): * src/frame.c (struct frame_parm_table.sym): * src/keyboard.c (scroll_bar_parts, struct event_head): * src/xdisp.c (struct props.name): Use the index of a builtin symbol rather than its address. All uses changed. * src/lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ... (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with symbol indexes rather than pointers, and which work better on MSB hosts because they shift right before tagging. All uses changed. (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END): No longer noops on wide-int hosts, since they work now. (builtin_lisp_symbol): New function.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 712c8f771f7..7c937332407 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5630,7 +5630,7 @@ garbage_collect_1 (void *end)
5630 mark_buffer (&buffer_local_symbols); 5630 mark_buffer (&buffer_local_symbols);
5631 5631
5632 for (i = 0; i < ARRAYELTS (lispsym); i++) 5632 for (i = 0; i < ARRAYELTS (lispsym); i++)
5633 mark_object (make_lisp_symbol (&lispsym[i])); 5633 mark_object (builtin_lisp_symbol (i));
5634 5634
5635 for (i = 0; i < staticidx; i++) 5635 for (i = 0; i < staticidx; i++)
5636 mark_object (*staticvec[i]); 5636 mark_object (*staticvec[i]);
@@ -7019,7 +7019,7 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max)
7019 { 7019 {
7020 for (int i = 0; i < ARRAYELTS (lispsym); i++) 7020 for (int i = 0; i < ARRAYELTS (lispsym); i++)
7021 { 7021 {
7022 Lisp_Object sym = make_lisp_symbol (&lispsym[i]); 7022 Lisp_Object sym = builtin_lisp_symbol (i);
7023 if (symbol_uses_obj (sym, obj)) 7023 if (symbol_uses_obj (sym, obj))
7024 { 7024 {
7025 found = Fcons (sym, found); 7025 found = Fcons (sym, found);