+2013-01-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ Avoid needless casts with XSAVE_POINTER.
+ * alloc.c (mark_object) [GC_MARK_STACK]:
+ * dired.c (directory_files_internal_unwind):
+ * fileio.c (do_auto_save_unwind):
+ * gtkutil.c (pop_down_dialog):
+ * keymap.c (map_keymap_char_table_item):
+ * lread.c (load_unwind):
+ * nsmenu.m (pop_down_menu):
+ * print.c (print_object) [GC_MARK_STACK]:
+ * xfns.c (clean_up_file_dialog):
+ * xmenu.c (cleanup_widget_value_tree):
+ Omit casts between XSAVE_POINTER and a pointer type.
+
2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
#if GC_MARK_STACK
if (ptr->area)
{
- Lisp_Object *p = (Lisp_Object *) ptr->data[0].pointer;
+ Lisp_Object *p = ptr->data[0].pointer;
ptrdiff_t nelt;
for (nelt = ptr->data[1].integer; nelt > 0; nelt--, p++)
mark_maybe_object (*p);
static Lisp_Object
directory_files_internal_unwind (Lisp_Object dh)
{
- DIR *d = (DIR *) XSAVE_POINTER (dh);
+ DIR *d = XSAVE_POINTER (dh);
block_input ();
closedir (d);
unblock_input ();
do_auto_save_unwind (Lisp_Object arg) /* used as unwind-protect function */
{
- FILE *stream = (FILE *) XSAVE_POINTER (arg);
+ FILE *stream = XSAVE_POINTER (arg);
auto_saving = 0;
if (stream != NULL)
{
static Lisp_Object
pop_down_dialog (Lisp_Object arg)
{
- struct xg_dialog_data *dd = (struct xg_dialog_data *) XSAVE_POINTER (arg);
+ struct xg_dialog_data *dd = XSAVE_POINTER (arg);
block_input ();
if (dd->w) gtk_widget_destroy (dd->w);
{
if (!NILP (val))
{
- map_keymap_function_t fun
- = (map_keymap_function_t) XSAVE_POINTER (XCAR (args));
+ map_keymap_function_t fun = XSAVE_POINTER (XCAR (args));
args = XCDR (args);
/* If the key is a range, make a copy since map_char_table modifies
it in place. */
static Lisp_Object
load_unwind (Lisp_Object arg) /* Used as unwind-protect function in load. */
{
- FILE *stream = (FILE *) XSAVE_POINTER (arg);
+ FILE *stream = XSAVE_POINTER (arg);
if (stream != NULL)
{
block_input ();
static Lisp_Object
pop_down_menu (Lisp_Object arg)
{
- struct Popdown_data *unwind_data = (struct Popdown_data *) XSAVE_POINTER (arg);
+ struct Popdown_data *unwind_data = XSAVE_POINTER (arg);
block_input ();
if (popup_activated_flag)
normal circumstances. */
int limit = min (amount, 8);
- Lisp_Object *area = (Lisp_Object *) v->data[0].pointer;
+ Lisp_Object *area = v->data[0].pointer;
i = sprintf (buf, "with %"pD"d objects", amount);
strout (buf, i, i, printcharfun);
static Lisp_Object
clean_up_file_dialog (Lisp_Object arg)
{
- Widget dialog = (Widget) XSAVE_POINTER (arg);
+ Widget dialog = XSAVE_POINTER (arg);
/* Clean up. */
block_input ();
static Lisp_Object
cleanup_widget_value_tree (Lisp_Object arg)
{
- free_menubar_widget_value_tree ((widget_value *) XSAVE_POINTER (arg));
+ free_menubar_widget_value_tree (XSAVE_POINTER (arg));
return Qnil;
}