emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111523: Avoid needless casts with XS


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111523: Avoid needless casts with XSAVE_POINTER.
Date: Mon, 14 Jan 2013 09:46:14 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111523
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2013-01-14 09:46:14 -0800
message:
  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.
modified:
  src/ChangeLog
  src/alloc.c
  src/dired.c
  src/fileio.c
  src/gtkutil.c
  src/keymap.c
  src/lread.c
  src/nsmenu.m
  src/print.c
  src/xfns.c
  src/xmenu.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-01-14 11:07:50 +0000
+++ b/src/ChangeLog     2013-01-14 17:46:14 +0000
@@ -1,3 +1,18 @@
+2013-01-14  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2013-01-14 09:55:21 +0000
+++ b/src/alloc.c       2013-01-14 17:46:14 +0000
@@ -5943,7 +5943,7 @@
 #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);

=== modified file 'src/dired.c'
--- a/src/dired.c       2013-01-14 09:55:21 +0000
+++ b/src/dired.c       2013-01-14 17:46:14 +0000
@@ -78,7 +78,7 @@
 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 ();

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2013-01-14 09:55:21 +0000
+++ b/src/fileio.c      2013-01-14 17:46:14 +0000
@@ -5507,7 +5507,7 @@
 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)
     {

=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c     2013-01-14 09:55:21 +0000
+++ b/src/gtkutil.c     2013-01-14 17:46:14 +0000
@@ -1650,7 +1650,7 @@
 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);

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2013-01-14 09:55:21 +0000
+++ b/src/keymap.c      2013-01-14 17:46:14 +0000
@@ -565,8 +565,7 @@
 {
   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.  */

=== modified file 'src/lread.c'
--- a/src/lread.c       2013-01-14 09:55:21 +0000
+++ b/src/lread.c       2013-01-14 17:46:14 +0000
@@ -1357,7 +1357,7 @@
 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 ();

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2013-01-14 09:55:21 +0000
+++ b/src/nsmenu.m      2013-01-14 17:46:14 +0000
@@ -1347,7 +1347,7 @@
 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)

=== modified file 'src/print.c'
--- a/src/print.c       2013-01-14 09:55:21 +0000
+++ b/src/print.c       2013-01-14 17:46:14 +0000
@@ -2054,7 +2054,7 @@
                   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);

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2013-01-14 09:55:21 +0000
+++ b/src/xfns.c        2013-01-14 17:46:14 +0000
@@ -5292,7 +5292,7 @@
 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 ();

=== modified file 'src/xmenu.c'
--- a/src/xmenu.c       2013-01-14 09:55:21 +0000
+++ b/src/xmenu.c       2013-01-14 17:46:14 +0000
@@ -1610,7 +1610,7 @@
 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;
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]