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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10918 in the body.
You can then email your comments to 10918 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#10918; Package guile. (Thu, 01 Mar 2012 14:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Brandt <tob.brandt <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 01 Mar 2012 14:59:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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?




Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Thu, 01 Mar 2012 21:24:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Brandt <tob.brandt <at> googlemail.com>:
bug acknowledged by developer. (Thu, 01 Mar 2012 21:24:02 GMT) Full text and rfc822 format available.

Message #10 received at 10918-done <at> debbugs.gnu.org (full text, mbox):

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 Mar 2012 11:24:02 GMT) Full text and rfc822 format available.

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.