guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-15-70-gbe


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-15-70-gbe90d0b
Date: Sun, 13 Feb 2011 13:50:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=be90d0b6f9e79bc882b2289bf0a5ea1b3c082b3c

The branch, master has been updated
       via  be90d0b6f9e79bc882b2289bf0a5ea1b3c082b3c (commit)
       via  10b9343f04ce8ed245b8d4316805909d2821d5b1 (commit)
       via  b339459e9443a319ce4289c2936783ca3abb7ef1 (commit)
      from  dc20f5a80943d0f7661848c4d1f6141897f6111b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit be90d0b6f9e79bc882b2289bf0a5ea1b3c082b3c
Author: Ludovic Courtès <address@hidden>
Date:   Sun Feb 13 14:50:05 2011 +0100

    Add `scm_t_subr' typedef (fix bug #23681).
    
    * libguile/__scm.h (scm_t_subr): New typedef.
    
    * libguile/deprecated.h (scm_make_gsubr, scm_make_gsubr_with_generic,
      scm_call_catching_errors): Use it.
    
    * libguile/gsubr.h (scm_c_make_gsubr, scm_c_define_gsubr,
      scm_c_define_gsubr_with_generic): Likewise.
    
    * libguile/smob.h (scm_smob_descriptor)[apply]: Likewise.
      (scm_set_smob_apply): Likewise.
    
    * libguile/snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Likewise.

commit 10b9343f04ce8ed245b8d4316805909d2821d5b1
Author: Ludovic Courtès <address@hidden>
Date:   Sun Feb 13 14:47:33 2011 +0100

    Change `scm_ramapc' prototype to avoid empty declarators (bug #23681).
    
    * libguile/array-map.h (scm_ramapc): Change `cproc' to `void *' instead
      of using empty declarators.
    
    * libguile/array-map.c (scm_ramapc): Adjust accordingly.

commit b339459e9443a319ce4289c2936783ca3abb7ef1
Author: Ludovic Courtès <address@hidden>
Date:   Sun Feb 13 14:45:47 2011 +0100

    Fix prototype of `scm_the_vm'.
    
    * libguile/vm.h (scm_the_vm): Use `(void)' instead of `()'.

-----------------------------------------------------------------------

Summary of changes:
 libguile/__scm.h      |   16 +++++++++++++++-
 libguile/array-map.c  |    5 ++++-
 libguile/array-map.h  |    5 +++--
 libguile/deprecated.h |    7 ++++---
 libguile/gsubr.h      |   15 ++++++++-------
 libguile/smob.h       |    7 ++++---
 libguile/snarf.h      |   14 ++++----------
 libguile/vm.h         |    4 ++--
 8 files changed, 44 insertions(+), 29 deletions(-)

diff --git a/libguile/__scm.h b/libguile/__scm.h
index efdab6d..2bfb4f6 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -3,7 +3,8 @@
 #ifndef SCM___SCM_H
 #define SCM___SCM_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006, 2007, 2008, 
2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006,
+ *   2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -424,6 +425,19 @@
 
 #include "libguile/tags.h"
 
+
+/* The type of subrs, i.e., Scheme procedures implemented in C.  Empty
+   function declarators are used internally for pointers to functions of
+   any arity.  However, these are equivalent to `(void)' in C++, are
+   obsolescent as of C99, and trigger `strict-prototypes' GCC warnings
+   (bug #23681).  */
+
+#ifdef BUILDING_LIBGUILE
+typedef SCM (* scm_t_subr) ();
+#else
+typedef void *scm_t_subr;
+#endif
+
 
 #ifdef vms
 # ifndef CHEAP_CONTINUATIONS
diff --git a/libguile/array-map.c b/libguile/array-map.c
index dd88136..d442bdf 100644
--- a/libguile/array-map.c
+++ b/libguile/array-map.c
@@ -168,13 +168,16 @@ scm_ra_matchp (SCM ra0, SCM ras)
      SCM lra;           list of source arrays.
      const char *what;  caller, for error reporting. */
 int 
-scm_ramapc (int (*cproc)(), SCM data, SCM ra0, SCM lra, const char *what)
+scm_ramapc (void *cproc_ptr, SCM data, SCM ra0, SCM lra, const char *what)
 {
   SCM z;
   SCM vra0, ra1, vra1;
   SCM lvra, *plvra;
   long *vinds;
   int k, kmax;
+  int (*cproc) ();
+
+  cproc = cproc_ptr;
   switch (scm_ra_matchp (ra0, lra))
     {
     default:
diff --git a/libguile/array-map.h b/libguile/array-map.h
index 471861b..43d2a92 100644
--- a/libguile/array-map.h
+++ b/libguile/array-map.h
@@ -3,7 +3,8 @@
 #ifndef SCM_ARRAY_MAP_H
 #define SCM_ARRAY_MAP_H
 
-/* Copyright (C) 1995,1996,1997,2000, 2006, 2008, 2009, 2010 Free Software 
Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2006, 2008, 2009, 2010,
+ *   2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -28,7 +29,7 @@
 
 
 SCM_API int scm_ra_matchp (SCM ra0, SCM ras);
-SCM_API int scm_ramapc (int (*cproc) (), SCM data, SCM ra0, SCM lra,
+SCM_API int scm_ramapc (void *cproc, SCM data, SCM ra0, SCM lra,
                        const char *what);
 SCM_API int scm_array_fill_int (SCM ra, SCM fill, SCM ignore);
 SCM_API SCM scm_array_fill_x (SCM ra, SCM fill);
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 68aee63..7deee35 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -133,12 +133,12 @@ SCM_DEPRECATED SCM scm_internal_with_fluids (SCM fluids, 
SCM vals,
 
 SCM_DEPRECATED SCM scm_make_gsubr (const char *name,
                                   int req, int opt, int rst,
-                                  SCM (*fcn)());
+                                  scm_t_subr fcn);
 SCM_DEPRECATED SCM scm_make_gsubr_with_generic (const char *name,
                                                int req,
                                                int opt,
                                                int rst,
-                                               SCM (*fcn)(),
+                                               scm_t_subr fcn,
                                                SCM *gf);
 
 SCM_DEPRECATED SCM scm_create_hook (const char* name, int n_args);
@@ -173,7 +173,8 @@ SCM_DEPRECATED SCM scm_read_and_eval_x (SCM port);
 
 #define SCM_SUBR_DOC(x) SCM_BOOL_F
 
-SCM_DEPRECATED SCM scm_call_catching_errors (SCM (*thunk)(), SCM 
(*err_filter)(),
+SCM_DEPRECATED SCM scm_call_catching_errors (scm_t_subr thunk,
+                                            scm_t_subr err_filter,
                                             void * closure);
 
 SCM_DEPRECATED long scm_make_smob_type_mfpe (char *name, size_t size,
diff --git a/libguile/gsubr.h b/libguile/gsubr.h
index faa4bb0..5adffa4 100644
--- a/libguile/gsubr.h
+++ b/libguile/gsubr.h
@@ -3,7 +3,8 @@
 #ifndef SCM_GSUBR_H
 #define SCM_GSUBR_H
 
-/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009, 2010 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 2000, 2001, 2006, 2008, 2009,
+ *   2010, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -59,16 +60,16 @@ SCM_API SCM scm_subr_objcode_trampoline (unsigned int nreq,
 
 
 
-SCM_API SCM scm_c_make_gsubr (const char *name, 
-                             int req, int opt, int rst, SCM (*fcn) ());
+SCM_API SCM scm_c_make_gsubr (const char *name,
+                             int req, int opt, int rst, scm_t_subr fcn);
 SCM_API SCM scm_c_make_gsubr_with_generic (const char *name,
                                           int req, int opt, int rst,
-                                          SCM (*fcn) (), SCM *gf);
-SCM_API SCM scm_c_define_gsubr (const char *name, 
-                               int req, int opt, int rst, SCM (*fcn) ());
+                                          scm_t_subr fcn, SCM *gf);
+SCM_API SCM scm_c_define_gsubr (const char *name,
+                               int req, int opt, int rst, scm_t_subr fcn);
 SCM_API SCM scm_c_define_gsubr_with_generic (const char *name,
                                             int req, int opt, int rst,
-                                            SCM (*fcn) (), SCM *gf);
+                                            scm_t_subr fcn, SCM *gf);
 
 SCM_INTERNAL void scm_init_gsubr (void);
 
diff --git a/libguile/smob.h b/libguile/smob.h
index 07deebd..6a7ceea 100644
--- a/libguile/smob.h
+++ b/libguile/smob.h
@@ -3,7 +3,8 @@
 #ifndef SCM_SMOB_H
 #define SCM_SMOB_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006, 2009, 2010 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2004, 2006, 2009,
+ *   2010, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -40,7 +41,7 @@ typedef struct scm_smob_descriptor
   size_t (*free) (SCM);
   int (*print) (SCM exp, SCM port, scm_print_state *pstate);
   SCM (*equalp) (SCM, SCM);
-  SCM (*apply) ();
+  scm_t_subr apply;
   SCM apply_trampoline_objcode;
 } scm_smob_descriptor;
 
@@ -202,7 +203,7 @@ SCM_API void scm_set_smob_print (scm_t_bits tc,
                                 int (*print) (SCM, SCM, scm_print_state*));
 SCM_API void scm_set_smob_equalp (scm_t_bits tc, SCM (*equalp) (SCM, SCM));
 SCM_API void scm_set_smob_apply (scm_t_bits tc,
-                                SCM (*apply) (),
+                                scm_t_subr apply,
                                 unsigned int req,
                                 unsigned int opt,
                                 unsigned int rst);
diff --git a/libguile/snarf.h b/libguile/snarf.h
index fcd0173..9bb998e 100644
--- a/libguile/snarf.h
+++ b/libguile/snarf.h
@@ -3,7 +3,8 @@
 #ifndef SCM_SNARF_H
 #define SCM_SNARF_H
 
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 
2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ *   2004, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -25,16 +26,9 @@
 
 /* Macros for snarfing initialization actions from C source. */
 
-#if defined(__cplusplus) || defined(GUILE_CPLUSPLUS_SNARF)
+/* Casting to a function that can take any number of arguments.  */
+#define SCM_FUNC_CAST_ARBITRARY_ARGS  scm_t_subr
 
-/* This used to be "SCM (*)(...)" but GCC on RedHat 7.1 doesn't seem
-   to like it.
- */
-#define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)()
-
-#else
-#define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)()
-#endif
 
 #if (defined SCM_ALIGNED) && (SCM_DEBUG_TYPING_STRICTNESS <= 1)
 /* We support static allocation of some `SCM' objects.  */
diff --git a/libguile/vm.h b/libguile/vm.h
index bb7a7df..d354a53 100644
--- a/libguile/vm.h
+++ b/libguile/vm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -59,7 +59,7 @@ SCM_API SCM scm_the_vm_fluid;
 #define SCM_VM_DATA(vm)                ((struct scm_vm *) SCM_CELL_WORD_1 (vm))
 #define SCM_VALIDATE_VM(pos,x) SCM_MAKE_VALIDATE (pos, x, VM_P)
 
-SCM_API SCM scm_the_vm ();
+SCM_API SCM scm_the_vm (void);
 SCM_API SCM scm_make_vm (void);
 
 SCM_API SCM scm_the_vm (void);


hooks/post-receive
-- 
GNU Guile



reply via email to

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