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-6-87-gcf9


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-87-gcf9a806
Date: Thu, 07 Jan 2010 15:39:01 +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=cf9a806dbd8fc58caafefbb4a5328fac2d322cee

The branch, master has been updated
       via  cf9a806dbd8fc58caafefbb4a5328fac2d322cee (commit)
      from  8ffcf6e725f97a4f3480ef6583743d7786e42997 (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 cf9a806dbd8fc58caafefbb4a5328fac2d322cee
Author: Andy Wingo <address@hidden>
Date:   Thu Jan 7 16:40:13 2010 +0100

    fix array->list
    
    * libguile/generalized-arrays.c (array_to_list): Fix buggy
      implementation. Thanks to Daniel Llorens del Río for the bug repor.

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

Summary of changes:
 THANKS                        |    1 +
 libguile/generalized-arrays.c |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/THANKS b/THANKS
index 9ffb0f0..94b86a1 100644
--- a/THANKS
+++ b/THANKS
@@ -70,6 +70,7 @@ For fixes or providing information which led to a fix:
            Matt Kraai
          Daniel Kraft
        Miroslav Lichvar
+         Daniel Llorens del Río
            Jeff Long
          Marco Maggi
         Gregory Marton
diff --git a/libguile/generalized-arrays.c b/libguile/generalized-arrays.c
index 8bbbed4..ea5388d 100644
--- a/libguile/generalized-arrays.c
+++ b/libguile/generalized-arrays.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 
2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 
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
@@ -243,14 +243,13 @@ array_to_list (scm_t_array_handle *h, size_t dim, 
unsigned long pos)
     {
       SCM res = SCM_EOL;
       long inc;
-      size_t i, lbnd;
+      size_t i;
 
-      i = h->dims[dim].ubnd;
-      lbnd = h->dims[dim].lbnd;
+      i = h->dims[dim].ubnd - h->dims[dim].lbnd + 1;
       inc = h->dims[dim].inc;
-      pos += (i - h->dims[dim].ubnd) * inc;
+      pos += (i - 1) * inc;
 
-      for (; i >= lbnd; i--, pos -= inc)
+      for (; i > 0; i--, pos -= inc)
         res = scm_cons (array_to_list (h, dim + 1, pos), res);
       return res;
     }


hooks/post-receive
-- 
GNU Guile




reply via email to

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