emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r100854: Fix up "missing braces" warn


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100854: Fix up "missing braces" warning.
Date: Tue, 20 Jul 2010 17:26:53 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100854
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-07-20 17:26:53 +0200
message:
  Fix up "missing braces" warning.
  * src/eval.c (Feval, Ffuncall): Use the new names.
  * src/lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED.
  (DEFUN): Add braces around the union initialisation and use ## to
  specify the right union alternative and avoid a cast.
modified:
  src/ChangeLog
  src/eval.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-07-20 11:13:25 +0000
+++ b/src/ChangeLog     2010-07-20 15:26:53 +0000
@@ -1,3 +1,11 @@
+2010-07-20  Stefan Monnier  <address@hidden>
+
+       * eval.c (Feval, Ffuncall): Use the new names.
+
+       * lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED.
+       (DEFUN): Add braces around the union initialisation and use ## to
+       specify the right union alternative and avoid a cast.
+
 2010-07-18  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in ($(BLD)/keyboard.$(O)): Update dependencies.

=== modified file 'src/eval.c'
--- a/src/eval.c        2010-07-13 04:47:45 +0000
+++ b/src/eval.c        2010-07-20 15:26:53 +0000
@@ -2299,7 +2299,7 @@
       if (XSUBR (fun)->max_args == UNEVALLED)
        {
          backtrace.evalargs = 0;
-         val = (XSUBR (fun)->function.a1) (args_left);
+         val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
          goto done;
        }
 
@@ -2325,7 +2325,7 @@
          backtrace.args = vals;
          backtrace.nargs = XINT (numargs);
 
-         val = (XSUBR (fun)->function.am) (XINT (numargs), vals);
+         val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
          UNGCPRO;
          goto done;
        }
@@ -2968,7 +2968,7 @@
 
       if (XSUBR (fun)->max_args == MANY)
        {
-         val = (XSUBR (fun)->function.am) (numargs, args + 1);
+         val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
          goto done;
        }
 

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2010-07-13 04:47:45 +0000
+++ b/src/lisp.h        2010-07-20 15:26:53 +0000
@@ -971,7 +971,8 @@
       Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 
Lisp_Object, Lisp_Object);
       Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object);
       Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
-      Lisp_Object (*am) (int, Lisp_Object *);
+      Lisp_Object (*aUNEVALLED) (Lisp_Object args);
+      Lisp_Object (*aMANY) (int, Lisp_Object *);
     } function;
     short min_args, max_args;
     const char *symbol_name;
@@ -1775,7 +1776,8 @@
   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                          \
   DECL_ALIGN (struct Lisp_Subr, sname) =                               \
     { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),    \
-      (Lisp_Object(*)(void)) fnname, minargs, maxargs, lname, intspec, 0}; \
+      { .a ## maxargs = fnname },                              \
+      minargs, maxargs, lname, intspec, 0};                            \
   Lisp_Object fnname
 
 /* Note that the weird token-substitution semantics of ANSI C makes


reply via email to

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