This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

%sort-vector bug


Hello,

I was testing the (rnrs sorting) library and found that list-sort worked as advertised, but vector-sort gave me a void return. I tracked it down to %sort-vector (in srfi95.scm) erroneously being declared to return ":: void" rather than ":: vector". Please apply this patch (or just remove the ":: void").

Index: kawa/lib/srfi95.scm
===================================================================
--- kawa/lib/srfi95.scm	(revision 6876)
+++ kawa/lib/srfi95.scm	(working copy)
@@ -193,7 +193,7 @@
       ((null? sorted) seq)
     (set! (seq i) (car sorted))))

-(define (%sort-vector (seq :: gnu.lists.Sequence) less? #!optional (key #f)) :: void
+(define (%sort-vector (seq :: gnu.lists.Sequence) less? #!optional (key #f)) :: vector
(let* ((dim (seq:size))
(newra (make-vector dim)))
(do ((sorted (%sort-list (rank-1-array->list seq) less? key)



Thanks, Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com


Attachment: srfi95.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]