Message403820
Py_buffer.shape requires a Py_ssize_t* pointer. It's not convenient. For example, the array module uses:
static int
array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
{
...
if ((flags & PyBUF_ND)==PyBUF_ND) {
view->shape = &((PyVarObject*)self)->ob_size;
}
...
return 0;
}
This code is not compatible with a fully opaque PyObject structure:
https://bugs.python.org/issue39573#msg401395 |
|
Date |
User |
Action |
Args |
2021-10-13 10:28:48 | vstinner | set | recipients:
+ vstinner, christian.heimes, petr.viktorin |
2021-10-13 10:28:48 | vstinner | set | messageid: <1634120928.57.0.950875501322.issue45459@roundup.psfhosted.org> |
2021-10-13 10:28:48 | vstinner | link | issue45459 messages |
2021-10-13 10:28:48 | vstinner | create | |
|