Message369561
As far as I can see it in typeslots.h [1], the buffer protocol is still not supported when using type specs:
/* Disabled, see #10181 */
#undef Py_bf_getbuffer
#undef Py_bf_releasebuffer
It seems that the discussion in issue 10181 did not lead anywhere at the time (2010-2012).
I'm not talking about the limited API or the stable ABI here, I'm talking about using type specs to define an extension type. The work-around is to manually set "PyTypeObject->tp_as_buffer" after creating the type, but since PyType_Ready() then does not see that struct pointer, you also still have to make sure that the type correctly inherits the slots from the base type if you're not defining all of them yourself.
Can we just add support for the above slots?
[1] https://github.com/python/cpython/blob/ca829102213c466ffecb1e464be5c8cb3967d961/Include/typeslots.h#L2-L4 |
|
Date |
User |
Action |
Args |
2020-05-22 07:51:02 | scoder | set | recipients:
+ scoder, paul.moore, ncoghlan, pitrou, vstinner, petr.viktorin, skrah |
2020-05-22 07:51:02 | scoder | set | messageid: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org> |
2020-05-22 07:51:02 | scoder | link | issue40724 messages |
2020-05-22 07:51:00 | scoder | create | |
|