[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

Petr Viktorin report at bugs.python.org
Tue Oct 20 05:26:32 EDT 2020


Petr Viktorin <encukou at gmail.com> added the comment:

Also: PyType_GetSlot should return a function pointer, not data.

For some slots (Py_tp_doc, Py_tp_methods, Py_tp_members, Py_tp_getset) that ship has sailed, but for new ones, we should honor the distinction between data and function pointers. The C standard says they're distinct, so it might bite us in the future (e.g. compiling to WebAssembly).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41618>
_______________________________________


More information about the Python-bugs-list mailing list