Antoine Pitrou <pit...@free.fr> added the comment: > (1) Is there documentation for the 'smalltable' field of the Py_buffer > struct anywhere? What are the requirements for the exporter here?
No, and no particular requirements AFAIR. It is a piece of internal storage aimed at avoiding the nagging allocation and ownership problem (but only so when this storage is large enough, of course). > E.g., is it / should it be a requirement that shape, strides and > suboffsets are all NULL whenever 'smalltable' is used? Not at all. On the contrary, smalltable can be used as a piece of storage for some of these fields. > (2) Same question for the 'obj' field: what's the purpose of this > field, from the POV of 3rd party buffer exporters? None, it's used by the consumer side of the API, to know which object exported the buffer and to keep a reference to it so that it doesn't get deallocated early. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9990> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com