You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!PyObject_CheckBuffer(dest) ||
!PyObject_CheckBuffer(src)) {
PyErr_SetString(PyExc_TypeError,
"both destination and source must be "\
"bytes-like objects");
So the 'PyObjects' indeed have to be buffer-like. I don't know the technical details, but I suspect that there is no real bug.
I don't know the technical details, but I suspect that there is no real bug.
There is a bug as the documentation does not match the implementation, Py_buffer is not a Python object. In this case IMHO the documentation should be fixed.
Activity
terryjreedy commentedon Mar 3, 2023
I few lines below, abstract.c has
So the 'PyObjects' indeed have to be buffer-like. I don't know the technical details, but I suspect that there is no real bug.
ronaldoussoren commentedon Mar 3, 2023
There is a bug as the documentation does not match the implementation,
Py_bufferis not a Python object. In this case IMHO the documentation should be fixed.sobolevn commentedon Mar 3, 2023
Yes,
PyObject_CheckBufferlooks like so:So, there's clearly a bug in the docs. PR is sent :)
Thanks a lot for the report!
pythongh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject`s
gh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (#…
pythongh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObjec…
gh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (G…
Merge branch 'main' into nodeaddict