Message314424
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. :-) |
|
| Date |
User |
Action |
Args |
| 2018-03-25 18:18:52 | skrah | set | recipients:
+ skrah, pitrou, docs@python |
| 2018-03-25 18:18:51 | skrah | set | messageid: <1522001931.97.0.467229070634.issue33126@psf.upfronthosting.co.za> |
| 2018-03-25 18:18:51 | skrah | link | issue33126 messages |
| 2018-03-25 18:18:51 | skrah | create | |
|