summaryrefslogtreecommitdiff
path: root/src/keymap.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-01-14 13:55:21 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-01-14 13:55:21 +0400
commit73ebd38f16c4799b657e501f188e9f3a3eca7805 (patch)
tree2584576d6931b14b336ac4ed3eb9eb513892da2c /src/keymap.c
parentd6d02e06ee135655b604a12b0c53987988277a16 (diff)
downloademacs-73ebd38f16c4799b657e501f188e9f3a3eca7805.tar.gz
emacs-73ebd38f16c4799b657e501f188e9f3a3eca7805.tar.bz2
emacs-73ebd38f16c4799b657e501f188e9f3a3eca7805.zip
Make Lisp_Save_Value more versatile storage for up to four objects.
* lisp.h (toplevel): Enumeration to describe types of saved objects. (struct Lisp_Save_Value): New layout. Adjust comments. (XSAVE_POINTER): New macro. (XSAVE_INTEGER): Likewise. (allocate_misc): Add prototype. (free_misc): Likewise. * alloc.c (allocate_misc): Now global. (free_misc): Likewise. Adjust comment. (make_save_value): Use new Lisp_Save_Value layout. Adjust comment. (free_save_value): Likewise. (mark_object): Likewise. * editfns.c (save_excursion_save): Pack everything within Lisp_Save_Value and so avoid xmalloc. (save_excursion_restore): Adjust to match new layout. Use free_misc because we do not allocate extra memory any more. Add eassert. * print.c (print_object): New code to print Lisp_Save_Value. Do not rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments. * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c, * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c: Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c
index d1ddd55a358..7b5aa45ebf3 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -566,14 +566,14 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val)
if (!NILP (val))
{
map_keymap_function_t fun
- = (map_keymap_function_t) XSAVE_VALUE (XCAR (args))->pointer;
+ = (map_keymap_function_t) XSAVE_POINTER (XCAR (args));
args = XCDR (args);
/* If the key is a range, make a copy since map_char_table modifies
it in place. */
if (CONSP (key))
key = Fcons (XCAR (key), XCDR (key));
map_keymap_item (fun, XCDR (args), key, val,
- XSAVE_VALUE (XCAR (args))->pointer);
+ XSAVE_POINTER (XCAR (args)));
}
}