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


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




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.