diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-03-22 16:17:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 16:17:34 (GMT) |
commit | 05e4a296ecc127641160a04f39cc02c0f66a8c27 (patch) | |
tree | 59e73090785087a5e15175c815a20986e59a5728 /Objects | |
parent | b33e52511a59c6da7132c226b7f7489b092a33eb (diff) | |
download | cpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.zip cpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.tar.gz cpython-05e4a296ecc127641160a04f39cc02c0f66a8c27.tar.bz2 |
bpo-40024: Add PyModule_AddType() helper function (GH-19088)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index e27c4b2..bed50d1 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -431,6 +431,7 @@ check_set_special_type_attr(PyTypeObject *type, PyObject *value, const char *nam const char * _PyType_Name(PyTypeObject *type) { + assert(type->tp_name != NULL); const char *s = strrchr(type->tp_name, '.'); if (s == NULL) { s = type->tp_name; |