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: Tobias Brandt <tob.brandt <at> googlemail.com>
To: 10918 <at> debbugs.gnu.org
Subject: bug#10918: 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.