summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-01-10 13:33:38 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-01-10 13:42:35 -0800
commit6a37ecee0884ff30ac7666e6502e2a9d2608f291 (patch)
tree875bd8310981ff850911f04da4c3c3b95f34537b /src/frame.c
parent649937920b5023be5c0685d1537f5ea2bfb9899a (diff)
downloademacs-6a37ecee0884ff30ac7666e6502e2a9d2608f291.tar.gz
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/frame.c')
-rw-r--r--src/frame.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/frame.c b/src/frame.c
index fb9bf2e9cbb..3d2ffbf624f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2925,48 +2925,48 @@ or bottommost possible position (that stays within the screen). */)
struct frame_parm_table {
const char *name;
- struct Lisp_Symbol *sym;
+ int sym;
};
static const struct frame_parm_table frame_parms[] =
{
- {"auto-raise", XSYMBOL_INIT (Qauto_raise)},
- {"auto-lower", XSYMBOL_INIT (Qauto_lower)},
- {"background-color", 0},
- {"border-color", XSYMBOL_INIT (Qborder_color)},
- {"border-width", XSYMBOL_INIT (Qborder_width)},
- {"cursor-color", XSYMBOL_INIT (Qcursor_color)},
- {"cursor-type", XSYMBOL_INIT (Qcursor_type)},
- {"font", 0},
- {"foreground-color", 0},
- {"icon-name", XSYMBOL_INIT (Qicon_name)},
- {"icon-type", XSYMBOL_INIT (Qicon_type)},
- {"internal-border-width", XSYMBOL_INIT (Qinternal_border_width)},
- {"right-divider-width", XSYMBOL_INIT (Qright_divider_width)},
- {"bottom-divider-width", XSYMBOL_INIT (Qbottom_divider_width)},
- {"menu-bar-lines", XSYMBOL_INIT (Qmenu_bar_lines)},
- {"mouse-color", XSYMBOL_INIT (Qmouse_color)},
- {"name", XSYMBOL_INIT (Qname)},
- {"scroll-bar-width", XSYMBOL_INIT (Qscroll_bar_width)},
- {"scroll-bar-height", XSYMBOL_INIT (Qscroll_bar_height)},
- {"title", XSYMBOL_INIT (Qtitle)},
- {"unsplittable", XSYMBOL_INIT (Qunsplittable)},
- {"vertical-scroll-bars", XSYMBOL_INIT (Qvertical_scroll_bars)},
- {"horizontal-scroll-bars", XSYMBOL_INIT (Qhorizontal_scroll_bars)},
- {"visibility", XSYMBOL_INIT (Qvisibility)},
- {"tool-bar-lines", XSYMBOL_INIT (Qtool_bar_lines)},
- {"scroll-bar-foreground", XSYMBOL_INIT (Qscroll_bar_foreground)},
- {"scroll-bar-background", XSYMBOL_INIT (Qscroll_bar_background)},
- {"screen-gamma", XSYMBOL_INIT (Qscreen_gamma)},
- {"line-spacing", XSYMBOL_INIT (Qline_spacing)},
- {"left-fringe", XSYMBOL_INIT (Qleft_fringe)},
- {"right-fringe", XSYMBOL_INIT (Qright_fringe)},
- {"wait-for-wm", XSYMBOL_INIT (Qwait_for_wm)},
- {"fullscreen", XSYMBOL_INIT (Qfullscreen)},
- {"font-backend", XSYMBOL_INIT (Qfont_backend)},
- {"alpha", XSYMBOL_INIT (Qalpha)},
- {"sticky", XSYMBOL_INIT (Qsticky)},
- {"tool-bar-position", XSYMBOL_INIT (Qtool_bar_position)},
+ {"auto-raise", SYMBOL_INDEX (Qauto_raise)},
+ {"auto-lower", SYMBOL_INDEX (Qauto_lower)},
+ {"background-color", -1},
+ {"border-color", SYMBOL_INDEX (Qborder_color)},
+ {"border-width", SYMBOL_INDEX (Qborder_width)},
+ {"cursor-color", SYMBOL_INDEX (Qcursor_color)},
+ {"cursor-type", SYMBOL_INDEX (Qcursor_type)},
+ {"font", -1},
+ {"foreground-color", -1},
+ {"icon-name", SYMBOL_INDEX (Qicon_name)},
+ {"icon-type", SYMBOL_INDEX (Qicon_type)},
+ {"internal-border-width", SYMBOL_INDEX (Qinternal_border_width)},
+ {"right-divider-width", SYMBOL_INDEX (Qright_divider_width)},
+ {"bottom-divider-width", SYMBOL_INDEX (Qbottom_divider_width)},
+ {"menu-bar-lines", SYMBOL_INDEX (Qmenu_bar_lines)},
+ {"mouse-color", SYMBOL_INDEX (Qmouse_color)},
+ {"name", SYMBOL_INDEX (Qname)},
+ {"scroll-bar-width", SYMBOL_INDEX (Qscroll_bar_width)},
+ {"scroll-bar-height", SYMBOL_INDEX (Qscroll_bar_height)},
+ {"title", SYMBOL_INDEX (Qtitle)},
+ {"unsplittable", SYMBOL_INDEX (Qunsplittable)},
+ {"vertical-scroll-bars", SYMBOL_INDEX (Qvertical_scroll_bars)},
+ {"horizontal-scroll-bars", SYMBOL_INDEX (Qhorizontal_scroll_bars)},
+ {"visibility", SYMBOL_INDEX (Qvisibility)},
+ {"tool-bar-lines", SYMBOL_INDEX (Qtool_bar_lines)},
+ {"scroll-bar-foreground", SYMBOL_INDEX (Qscroll_bar_foreground)},
+ {"scroll-bar-background", SYMBOL_INDEX (Qscroll_bar_background)},
+ {"screen-gamma", SYMBOL_INDEX (Qscreen_gamma)},
+ {"line-spacing", SYMBOL_INDEX (Qline_spacing)},
+ {"left-fringe", SYMBOL_INDEX (Qleft_fringe)},
+ {"right-fringe", SYMBOL_INDEX (Qright_fringe)},
+ {"wait-for-wm", SYMBOL_INDEX (Qwait_for_wm)},
+ {"fullscreen", SYMBOL_INDEX (Qfullscreen)},
+ {"font-backend", SYMBOL_INDEX (Qfont_backend)},
+ {"alpha", SYMBOL_INDEX (Qalpha)},
+ {"sticky", SYMBOL_INDEX (Qsticky)},
+ {"tool-bar-position", SYMBOL_INDEX (Qtool_bar_position)},
};
#ifdef HAVE_WINDOW_SYSTEM
@@ -4824,9 +4824,9 @@ syms_of_frame (void)
for (i = 0; i < ARRAYELTS (frame_parms); i++)
{
- Lisp_Object v = (frame_parms[i].sym
- ? make_lisp_symbol (frame_parms[i].sym)
- : intern_c_string (frame_parms[i].name));
+ Lisp_Object v = (frame_parms[i].sym < 0
+ ? intern_c_string (frame_parms[i].name)
+ : builtin_lisp_symbol (frame_parms[i].sym));
Fput (v, Qx_frame_parameter, make_number (i));
}
}