guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, branch_release-1-8, updated. release_1


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, branch_release-1-8, updated. release_1-8-7-18-g899a17a
Date: Wed, 09 Jun 2010 21:18:52 +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=899a17a78389880e041c4ac5a54c099b4a8adc17

The branch, branch_release-1-8 has been updated
       via  899a17a78389880e041c4ac5a54c099b4a8adc17 (commit)
      from  23ff1cff612e95cba2a2d5385076a5e17c22048b (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 899a17a78389880e041c4ac5a54c099b4a8adc17
Author: Andy Wingo <address@hidden>
Date:   Wed Jun 9 23:21:20 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 |  136 +++++++++++++++++++++++++--------------------------
 1 files changed, 67 insertions(+), 69 deletions(-)

diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index ea7fc69..1f1569c 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 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 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
@@ -911,74 +911,6 @@ SCM_DEFINE (scm_hashx_remove_x, "hashx-remove!", 4, 0, 0,
 
 /* Hash table iterators */
 
-static const char s_scm_hash_fold[];
-
-SCM
-scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
-{
-  long i, n;
-  SCM buckets, result = init;
-  
-  if (SCM_HASHTABLE_P (table))
-    buckets = SCM_HASHTABLE_VECTOR (table);
-  else
-    buckets = table;
-  
-  n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
-  for (i = 0; i < n; ++i)
-    {
-      SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
-      while (!scm_is_null (ls))
-       {
-         if (!scm_is_pair (ls))
-           scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
-         handle = SCM_CAR (ls);
-         if (!scm_is_pair (handle))
-           scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
-         result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result);
-         ls = SCM_CDR (ls);
-       }
-    }
-
-  return result;
-}
-
-/* The following redundant code is here in order to be able to support
-   hash-for-each-handle.  An alternative would have been to replace
-   this code and scm_internal_hash_fold above with a single
-   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 (*fn) (), void *closure, SCM table)
-{
-  long i, n;
-  SCM buckets;
-  
-  if (SCM_HASHTABLE_P (table))
-    buckets = SCM_HASHTABLE_VECTOR (table);
-  else
-    buckets = table;
-  
-  n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
-  for (i = 0; i < n; ++i)
-    {
-      SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
-      while (!scm_is_null (ls))
-       {
-         if (!scm_is_pair (ls))
-           scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
-         handle = SCM_CAR (ls);
-         if (!scm_is_pair (handle))
-           scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
-         fn (closure, handle);
-         ls = SCM_CDR (ls);
-       }
-    }
-}
-
 SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, 
             (SCM proc, SCM init, SCM table),
            "An iterator over hash-table elements.\n"
@@ -1067,6 +999,72 @@ SCM_DEFINE (scm_hash_map_to_list, "hash-map->list", 2, 0, 
0,
 
 
 
+SCM
+scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
+{
+  long i, n;
+  SCM buckets, result = init;
+  
+  if (SCM_HASHTABLE_P (table))
+    buckets = SCM_HASHTABLE_VECTOR (table);
+  else
+    buckets = table;
+  
+  n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
+  for (i = 0; i < n; ++i)
+    {
+      SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
+      while (!scm_is_null (ls))
+       {
+         if (!scm_is_pair (ls))
+           scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
+         handle = SCM_CAR (ls);
+         if (!scm_is_pair (handle))
+           scm_wrong_type_arg (s_scm_hash_fold, SCM_ARG3, buckets);
+         result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result);
+         ls = SCM_CDR (ls);
+       }
+    }
+
+  return result;
+}
+
+/* The following redundant code is here in order to be able to support
+   hash-for-each-handle.  An alternative would have been to replace
+   this code and scm_internal_hash_fold above with a single
+   scm_internal_hash_fold_handles, but we don't want to promote such
+   an API. */
+
+void
+scm_internal_hash_for_each_handle (SCM (*fn) (), void *closure, SCM table)
+{
+  long i, n;
+  SCM buckets;
+  
+  if (SCM_HASHTABLE_P (table))
+    buckets = SCM_HASHTABLE_VECTOR (table);
+  else
+    buckets = table;
+  
+  n = SCM_SIMPLE_VECTOR_LENGTH (buckets);
+  for (i = 0; i < n; ++i)
+    {
+      SCM ls = SCM_SIMPLE_VECTOR_REF (buckets, i), handle;
+      while (!scm_is_null (ls))
+       {
+         if (!scm_is_pair (ls))
+           scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
+         handle = SCM_CAR (ls);
+         if (!scm_is_pair (handle))
+           scm_wrong_type_arg (s_scm_hash_for_each, SCM_ARG3, buckets);
+         fn (closure, handle);
+         ls = SCM_CDR (ls);
+       }
+    }
+}
+
+
+
 
 void
 scm_hashtab_prehistory ()


hooks/post-receive
-- 
GNU Guile



reply via email to

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