unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* vector->list
@ 2006-11-28 12:51 Szavai Gyula
  2006-11-29  9:25 ` vector->list Ludovic Courtès
  2006-12-01 20:09 ` vector->list Kevin Ryde
  0 siblings, 2 replies; 4+ messages in thread
From: Szavai Gyula @ 2006-11-28 12:51 UTC (permalink / raw)



guile-1.8-20061126

(let ((b (make-shared-array #(1) (lambda (x) '(0)) 2)))
   (list b
         (vector->list b)))
==> (#(1 1) ())



--- orig/libguile/vectors.c      2006-11-28 10:15:36.354766400 +0100
+++ mod/libguile/vectors.c   2006-11-28 10:21:52.195198400 +0100
@@ -392,11 +392,11 @@
    SCM res = SCM_EOL;
    const SCM *data;
    scm_t_array_handle handle;
-  size_t i, len;
+  size_t i, j, len;
    ssize_t inc;

    data = scm_vector_elements (v, &handle, &len, &inc);
-  for (i = len*inc; i > 0;)
+  for (i = len*inc, j = len; j > 0; --j)
      {
        i -= inc;
        res = scm_cons (data[i], res);


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-02 21:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-28 12:51 vector->list Szavai Gyula
2006-11-29  9:25 ` vector->list Ludovic Courtès
2006-12-01 20:09 ` vector->list Kevin Ryde
2006-12-02 21:07   ` vector->list Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).