GNU bug report logs - #10918
srfi-4 functions return wrong length for bytevectors

Previous Next

Package: guile;

Reported by: Tobias Brandt <tob.brandt <at> googlemail.com>

Date: Thu, 1 Mar 2012 14:59:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Subject: bug#10918: closed (Re: bug#10918: srfi-4 functions return wrong
 length for bytevectors)
Date: Thu, 01 Mar 2012 21:24:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#10918: srfi-4 functions return wrong length for bytevectors

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 10918 <at> debbugs.gnu.org.

-- 
10918: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10918
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mark H Weaver <mhw <at> netris.org>
To: Tobias Brandt <tob.brandt <at> googlemail.com>
Cc: 10918-done <at> debbugs.gnu.org
Subject: Re: bug#10918: srfi-4 functions return wrong length for bytevectors
Date: Thu, 01 Mar 2012 16:20:28 -0500
Tobias Brandt <tob.brandt <at> googlemail.com> writes:

> Applying any of the f/u/s*vector-length functions to
> a bytevector returns the wrong size. Specifically they
> multiply (instead of dividing) the size of the bytevector
> by the size of one element.
>
> scheme@(guile-user)> (use-modules (rnrs bytevectors))
> scheme@(guile-user)> (define bv (make-bytevector 4))
> scheme@(guile-user)> (bytevector-length bv)
> $1 = 4
> scheme@(guile-user)> (f32vector-length bv)
> $2 = 16

Fixed in ef405f8ba73fc57706d7155a2e008352416debcf.
Thanks for the bug report! :)

     Mark

[Message part 3 (message/rfc822, inline)]
From: Tobias Brandt <tob.brandt <at> googlemail.com>
To: bug-guile <at> gnu.org
Subject: srfi-4 functions return wrong length for bytevectors
Date: Thu, 1 Mar 2012 15:56:54 +0100
Applying any of the f/u/s*vector-length functions to
a bytevector returns the wrong size. Specifically they
multiply (instead of dividing) the size of the bytevector
by the size of one element.

scheme@(guile-user)> (use-modules (rnrs bytevectors))
scheme@(guile-user)> (define bv (make-bytevector 4))
scheme@(guile-user)> (bytevector-length bv)
$1 = 4
scheme@(guile-user)> (f32vector-length bv)
$2 = 16

I believe $2 should be 1, or am I interpreting the
documentation wrong?



This bug report was last modified 13 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.