Christian Heimes <li...@cheimes.de> added the comment:
IIRC shape, strides, and suboffsets are all arrays of ndims length. We could optimize allocation if we would require users to specify the value of ndims and don't allow them to change the value afterwards. PyBuffer_New(int ndims) then would allocate view of size sizeof(Py_buffer) + (3 * ndims * sizeof(Py_ssize_t *)). This would give us sufficient space to memcpy() shape, strides, and suboffsets arguments into memory after the Py_buffer struct. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45459> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com