diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-21 16:53:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 16:53:13 (GMT) |
commit | a1bf329bca80a0259da454c936075e11e6af710f (patch) | |
tree | 739c979b6084526941603b45ce6d17fb6a502002 /Objects/object.c | |
parent | fda88864980ffce57add0ea03fb9cbda2798975e (diff) | |
download | cpython-a1bf329bca80a0259da454c936075e11e6af710f.zip cpython-a1bf329bca80a0259da454c936075e11e6af710f.tar.gz cpython-a1bf329bca80a0259da454c936075e11e6af710f.tar.bz2 |
bpo-46417: Add missing types of _PyTypes_InitTypes() (GH-30749)
Add types removed by mistake by the commit adding
_PyTypes_FiniTypes().
Move also PyBool_Type at the end, since it depends on PyLong_Type.
PyBytes_Type and PyUnicode_Type no longer depend explicitly on
PyBaseObject_Type: it's the default of PyType_Ready().
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index dc2cba2..a5ee8ee 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1841,9 +1841,10 @@ _PyTypes_InitState(PyInterpreterState *interp) static PyTypeObject* static_types[] = { // base types &PyAsyncGen_Type, - &PyBool_Type, &PyByteArrayIter_Type, &PyByteArray_Type, + &PyBytesIter_Type, + &PyBytes_Type, &PyCFunction_Type, &PyCallIter_Type, &PyCapsule_Type, @@ -1866,6 +1867,7 @@ static PyTypeObject* static_types[] = { &PyDict_Type, &PyEllipsis_Type, &PyEnum_Type, + &PyFloat_Type, &PyFrame_Type, &PyFrozenSet_Type, &PyFunction_Type, @@ -1876,6 +1878,7 @@ static PyTypeObject* static_types[] = { &PyListRevIter_Type, &PyList_Type, &PyLongRangeIter_Type, + &PyLong_Type, &PyMemberDescr_Type, &PyMemoryView_Type, &PyMethodDescr_Type, @@ -1897,6 +1900,10 @@ static PyTypeObject* static_types[] = { &PyStdPrinter_Type, &PySuper_Type, &PyTraceBack_Type, + &PyTupleIter_Type, + &PyTuple_Type, + &PyUnicodeIter_Type, + &PyUnicode_Type, &PyWrapperDescr_Type, &Py_GenericAliasType, &_PyAnextAwaitable_Type, @@ -1917,6 +1924,7 @@ static PyTypeObject* static_types[] = { // subclasses: _PyTypes_FiniTypes() deallocates them before their base // class + &PyBool_Type, // base=&PyLong_Type &PyCMethod_Type, // base=&PyCFunction_Type &PyODictItems_Type, // base=&PyDictItems_Type &PyODictKeys_Type, // base=&PyDictKeys_Type |