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-11-26-g16


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-26-g162125a
Date: Wed, 09 Jun 2010 21:26:00 +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=162125af16f638a55b7578a6d00a3728970069dd

The branch, master has been updated
       via  162125af16f638a55b7578a6d00a3728970069dd (commit)
      from  ffd48603b03a104052beb19950941cbfc69f9193 (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 162125af16f638a55b7578a6d00a3728970069dd
Author: Andy Wingo <address@hidden>
Date:   Wed Jun 9 23:27:33 2010 +0200

    fix build error with Compaq C V6.3-025
    
    * libguile/hashtab.c: Re-arrange functions to avoid the need for
      pre-declaring character arrays with no length. Fixes compilation on
      Compaq C V6.3-025. Thanks to Jay Krell for the report.

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

Summary of changes:
 libguile/hashtab.c |  178 ++++++++++++++++++++++++++--------------------------
 1 files changed, 88 insertions(+), 90 deletions(-)

diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 059be6f..9cb75f2 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2009 
Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2009, 
2010 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
@@ -1067,7 +1067,93 @@ SCM_DEFINE (scm_hashx_remove_x, "hashx-remove!", 4, 0, 0,
 
 /* Hash table iterators */
 
-static const char s_scm_hash_fold[];
+SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, 
+            (SCM proc, SCM init, SCM table),
+           "An iterator over hash-table elements.\n"
+            "Accumulates and returns a result by applying PROC successively.\n"
+            "The arguments to PROC are \"(key value prior-result)\" where 
key\n"
+            "and value are successive pairs from the hash table TABLE, and\n"
+            "prior-result is either INIT (for the first application of PROC)\n"
+            "or the return value of the previous application of PROC.\n"
+            "For example, @code{(hash-fold acons '() tab)} will convert a 
hash\n"
+            "table into an a-list of key-value pairs.")
+#define FUNC_NAME s_scm_hash_fold
+{
+  SCM_VALIDATE_PROC (1, proc);
+  if (!SCM_HASHTABLE_P (table))
+    SCM_VALIDATE_VECTOR (3, table);
+  return scm_internal_hash_fold ((scm_t_hash_fold_fn) scm_call_3,
+                                (void *) SCM_UNPACK (proc), init, table);
+}
+#undef FUNC_NAME
+
+static SCM
+for_each_proc (void *proc, SCM handle)
+{
+  return scm_call_2 (SCM_PACK (proc), SCM_CAR (handle), SCM_CDR (handle));
+}
+
+SCM_DEFINE (scm_hash_for_each, "hash-for-each", 2, 0, 0, 
+            (SCM proc, SCM table),
+           "An iterator over hash-table elements.\n"
+            "Applies PROC successively on all hash table items.\n"
+            "The arguments to PROC are \"(key value)\" where key\n"
+            "and value are successive pairs from the hash table TABLE.")
+#define FUNC_NAME s_scm_hash_for_each
+{
+  SCM_VALIDATE_PROC (1, proc);
+  if (!SCM_HASHTABLE_P (table))
+    SCM_VALIDATE_VECTOR (2, table);
+  
+  scm_internal_hash_for_each_handle (for_each_proc,
+                                    (void *) SCM_UNPACK (proc),
+                                    table);
+  return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_hash_for_each_handle, "hash-for-each-handle", 2, 0, 0, 
+            (SCM proc, SCM table),
+           "An iterator over hash-table elements.\n"
+            "Applies PROC successively on all hash table handles.")
+#define FUNC_NAME s_scm_hash_for_each_handle
+{
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, 1, FUNC_NAME);
+  if (!SCM_HASHTABLE_P (table))
+    SCM_VALIDATE_VECTOR (2, table);
+  
+  scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) scm_call_1,
+                                    (void *) SCM_UNPACK (proc),
+                                    table);
+  return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
+static SCM
+map_proc (void *proc, SCM key, SCM data, SCM value)
+{
+  return scm_cons (scm_call_2 (SCM_PACK (proc), key, data), value);
+}
+
+SCM_DEFINE (scm_hash_map_to_list, "hash-map->list", 2, 0, 0, 
+            (SCM proc, SCM table),
+           "An iterator over hash-table elements.\n"
+            "Accumulates and returns as a list the results of applying PROC 
successively.\n"
+            "The arguments to PROC are \"(key value)\" where key\n"
+            "and value are successive pairs from the hash table TABLE.")
+#define FUNC_NAME s_scm_hash_map_to_list
+{
+  SCM_VALIDATE_PROC (1, proc);
+  if (!SCM_HASHTABLE_P (table))
+    SCM_VALIDATE_VECTOR (2, table);
+  return scm_internal_hash_fold (map_proc,
+                                (void *) SCM_UNPACK (proc),
+                                SCM_EOL,
+                                table);
+}
+#undef FUNC_NAME
+
+
 
 SCM
 scm_internal_hash_fold (scm_t_hash_fold_fn fn, void *closure,
@@ -1132,8 +1218,6 @@ scm_internal_hash_fold (scm_t_hash_fold_fn fn, void 
*closure,
    scm_internal_hash_fold_handles, but we don't want to promote such
    an API. */
 
-static const char s_scm_hash_for_each[];
-
 void
 scm_internal_hash_for_each_handle (scm_t_hash_handle_fn fn, void *closure,
                                   SCM table)
@@ -1163,92 +1247,6 @@ scm_internal_hash_for_each_handle (scm_t_hash_handle_fn 
fn, void *closure,
     }
 }
 
-SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, 
-            (SCM proc, SCM init, SCM table),
-           "An iterator over hash-table elements.\n"
-            "Accumulates and returns a result by applying PROC successively.\n"
-            "The arguments to PROC are \"(key value prior-result)\" where 
key\n"
-            "and value are successive pairs from the hash table TABLE, and\n"
-            "prior-result is either INIT (for the first application of PROC)\n"
-            "or the return value of the previous application of PROC.\n"
-            "For example, @code{(hash-fold acons '() tab)} will convert a 
hash\n"
-            "table into an a-list of key-value pairs.")
-#define FUNC_NAME s_scm_hash_fold
-{
-  SCM_VALIDATE_PROC (1, proc);
-  if (!SCM_HASHTABLE_P (table))
-    SCM_VALIDATE_VECTOR (3, table);
-  return scm_internal_hash_fold ((scm_t_hash_fold_fn) scm_call_3,
-                                (void *) SCM_UNPACK (proc), init, table);
-}
-#undef FUNC_NAME
-
-static SCM
-for_each_proc (void *proc, SCM handle)
-{
-  return scm_call_2 (SCM_PACK (proc), SCM_CAR (handle), SCM_CDR (handle));
-}
-
-SCM_DEFINE (scm_hash_for_each, "hash-for-each", 2, 0, 0, 
-            (SCM proc, SCM table),
-           "An iterator over hash-table elements.\n"
-            "Applies PROC successively on all hash table items.\n"
-            "The arguments to PROC are \"(key value)\" where key\n"
-            "and value are successive pairs from the hash table TABLE.")
-#define FUNC_NAME s_scm_hash_for_each
-{
-  SCM_VALIDATE_PROC (1, proc);
-  if (!SCM_HASHTABLE_P (table))
-    SCM_VALIDATE_VECTOR (2, table);
-  
-  scm_internal_hash_for_each_handle (for_each_proc,
-                                    (void *) SCM_UNPACK (proc),
-                                    table);
-  return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_hash_for_each_handle, "hash-for-each-handle", 2, 0, 0, 
-            (SCM proc, SCM table),
-           "An iterator over hash-table elements.\n"
-            "Applies PROC successively on all hash table handles.")
-#define FUNC_NAME s_scm_hash_for_each_handle
-{
-  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, 1, FUNC_NAME);
-  if (!SCM_HASHTABLE_P (table))
-    SCM_VALIDATE_VECTOR (2, table);
-  
-  scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) scm_call_1,
-                                    (void *) SCM_UNPACK (proc),
-                                    table);
-  return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
-static SCM
-map_proc (void *proc, SCM key, SCM data, SCM value)
-{
-  return scm_cons (scm_call_2 (SCM_PACK (proc), key, data), value);
-}
-
-SCM_DEFINE (scm_hash_map_to_list, "hash-map->list", 2, 0, 0, 
-            (SCM proc, SCM table),
-           "An iterator over hash-table elements.\n"
-            "Accumulates and returns as a list the results of applying PROC 
successively.\n"
-            "The arguments to PROC are \"(key value)\" where key\n"
-            "and value are successive pairs from the hash table TABLE.")
-#define FUNC_NAME s_scm_hash_map_to_list
-{
-  SCM_VALIDATE_PROC (1, proc);
-  if (!SCM_HASHTABLE_P (table))
-    SCM_VALIDATE_VECTOR (2, table);
-  return scm_internal_hash_fold (map_proc,
-                                (void *) SCM_UNPACK (proc),
-                                SCM_EOL,
-                                table);
-}
-#undef FUNC_NAME
-
 
 
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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