消息 [124504]
> (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. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2010-12-22 13:11:54 | pitrou | 修改 | recipients:
+ pitrou, teoliphant, mark.dickinson, ncoghlan, kermode |
| 2010-12-22 13:11:50 | pitrou | 链接 | issue9990 messages |
| 2010-12-22 13:11:50 | pitrou | 创建 | |
|