Author skrah
Recipients docs@python, pitrou, skrah
Date 2018-03-25.18:18:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522001931.97.0.467229070634.issue33126@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, the signatures are weird. In PyBuffer_FromContiguous(), "len" is
the size of "buf" in bytes.

If "buf" contains 6 floats, but "view" only has space for 4, then only
4 are copied into "view".


To avoid that sort of thing, I changed PyBuffer_ToContiguous() to
be more restrictive in 3.3, but kept the len parameter.

In PyBuffer_ToContiguous() it would not matter though if len(buf) > src->len, in which case buf would contain uninitialized bytes at
the end.


TBH, I don't think these functions are used very often. :-)
History
Date User Action Args
2018-03-25 18:18:52skrahsetrecipients: + skrah, pitrou, docs@python
2018-03-25 18:18:51skrahsetmessageid: <1522001931.97.0.467229070634.issue33126@psf.upfronthosting.co.za>
2018-03-25 18:18:51skrahlinkissue33126 messages
2018-03-25 18:18:51skrahcreate