Subject: bug#10918: closed (Re: bug#10918: srfi-4 functions return wrong length for bytevectors)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 01 Mar 2012 21:24:02 +0000

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 [email-masked].

-- 
10918: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10918
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#10918: srfi-4 functions return wrong length for bytevectors
From: Mark H Weaver <[email-masked]>
To: Tobias Brandt <[email-masked]>
Cc: [email-masked]
Date: Thu, 01 Mar 2012 16:20:28 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Tobias Brandt <[email-masked]> 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

Subject: srfi-4 functions return wrong length for bytevectors
From: Tobias Brandt <[email-masked]>
To: [email-masked]
Date: Thu, 1 Mar 2012 15:56:54 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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?