[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-10-22 Thread fancitron
fancitron added the comment: True enough. Btw, PyType_FromSpec accepts Py_tp_doc (char *), Py_tp_base (PyTypeObject *), etc ... so to be strictly standard compliant, a union would be necessary. PyType_GetName() sounds great. One "proper" workaround at the moment is PyObject_Get

[issue42035] PyType_GetSlot cannot get tp_name

2020-10-14 Thread fancitron
New submission from fancitron : In the Limited API (where PyTypeObject is opaque), there is no way to retrieve the tp_name of a type object. The PyType_GetSlot() function doesn’t define a slot ID Py_tp_name. This makes it inconvenient to port existing code to the Limited API