summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2021-08-17 13:39:34 (GMT)
committerGitHub <noreply@github.com>2021-08-17 13:39:34 (GMT)
commit3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f (patch)
treebe4a37d2598016830e499dd7fb45b75fea71b1e9 /Objects
parent6a358bb9482f7595b858ea7b800cbe66f0de5fa1 (diff)
downloadcpython-3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f.zip
cpython-3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f.tar.gz
cpython-3e2c643ae0b21f9e596bfd9c8ec99ca546ea8d0f.tar.bz2
bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 1efb9fc..a38690a 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3620,6 +3620,12 @@ PyType_GetName(PyTypeObject *type)
return type_name(type, NULL);
}
+PyObject *
+PyType_GetQualName(PyTypeObject *type)
+{
+ return type_qualname(type, NULL);
+}
+
void *
PyType_GetSlot(PyTypeObject *type, int slot)
{