mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)
This commit is contained in:
parent
5269c09145
commit
a390ebea17
10 changed files with 68 additions and 0 deletions
|
@ -3628,6 +3628,12 @@ PyType_FromSpec(PyType_Spec *spec)
|
|||
return PyType_FromSpecWithBases(spec, NULL);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
PyType_GetName(PyTypeObject *type)
|
||||
{
|
||||
return type_name(type, NULL);
|
||||
}
|
||||
|
||||
void *
|
||||
PyType_GetSlot(PyTypeObject *type, int slot)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue