Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
I do not like requirement to allocate Py_buffer on the heap. It adds an overhead. Common case in CPython code is: Py_buffer view; void *buf; Py_ssize_t len; PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE); buf = view.buf; len = view.len; // no other fields are used PyBuffer_Release(&view); And I want to keep it as simple and efficient as it can be. ---------- _______________________________________ 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