Message124504
| Author |
pitrou |
| Recipients |
kermode, mark.dickinson, ncoghlan, pitrou, teoliphant |
| Date |
2010年12月22日.13:11:50 |
| SpamBayes Score |
0.00043748395 |
| Marked as misclassified |
No |
| Message-id |
<1293023508.3680.2.camel@localhost.localdomain> |
| In-reply-to |
<1293023071.64.0.573931807415.issue9990@psf.upfronthosting.co.za> |
| Content |
> (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. |
|