Commit c50cf2ea authored by Paul Eggert's avatar Paul Eggert

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.
parent 57dd9e68
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.
......
......@@ -5943,7 +5943,7 @@ mark_object (Lisp_Object arg)
#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);
......
......@@ -78,7 +78,7 @@ directory_files_internal_w32_unwind (Lisp_Object arg)
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 ();
......
......@@ -5507,7 +5507,7 @@ static Lisp_Object
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)
{
......
......@@ -1650,7 +1650,7 @@ xg_dialog_response_cb (GtkDialog *w,
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);
......
......@@ -565,8 +565,7 @@ 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_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. */
......
......@@ -1357,7 +1357,7 @@ Return t if the file exists and loads successfully. */)
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 ();
......
......@@ -1347,7 +1347,7 @@ - (NSRect) frame
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)
......
......@@ -2054,7 +2054,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
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);
......
......@@ -5292,7 +5292,7 @@ file_dialog_unmap_cb (Widget widget, XtPointer client_data, XtPointer call_data)
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 ();
......
......@@ -1610,7 +1610,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv,
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment