* bug#10918: srfi-4 functions return wrong length for bytevectors
@ 2012-03-01 14:56 Tobias Brandt
2012-03-01 21:20 ` Mark H Weaver
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Brandt @ 2012-03-01 14:56 UTC (permalink / raw)
To: 10918
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#10918: srfi-4 functions return wrong length for bytevectors
2012-03-01 14:56 bug#10918: srfi-4 functions return wrong length for bytevectors Tobias Brandt
@ 2012-03-01 21:20 ` Mark H Weaver
0 siblings, 0 replies; 2+ messages in thread
From: Mark H Weaver @ 2012-03-01 21:20 UTC (permalink / raw)
To: Tobias Brandt; +Cc: 10918-done
Tobias Brandt <tob.brandt@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-01 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-01 14:56 bug#10918: srfi-4 functions return wrong length for bytevectors Tobias Brandt
2012-03-01 21:20 ` Mark H Weaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).