Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
Bug report
It is documented thatPyBUF_READ
should be used withmemoryview
objects. But, it is used inPyObject_GetBuffer
:
Line 3547 in5ecfd75
if (PyObject_GetBuffer(dataobj,&buf,PyBUF_READ)!=0) { |
Other similar places that access.buf
and.len
just usePyBUF_SIMPLE
, which I think we should use here as well.
I will send a PR.
Originally found by@serhiy-storchaka in#114669 (comment)
Linked PRs
- gh-114685: Fix incorrect use of
PyBUF_READ
inimport.c
#114686 - [3.12] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) #114700
- [3.11] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) #114701
- gh-114685: Check flags in PyObject_GetBuffer() #114707
- gh-114685:
PyBuffer_FillInfo
now raises onPyBUF_{READ,WRITE}
#114802