mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940)
There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL.
This commit is contained in:
parent
56c7176d1d
commit
d2e2e53f73
21 changed files with 89 additions and 169 deletions
|
@ -960,24 +960,6 @@ _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize)
|
|||
}
|
||||
|
||||
|
||||
PyStatus
|
||||
_PyTuple_InitTypes(PyInterpreterState *interp)
|
||||
{
|
||||
if (!_Py_IsMainInterpreter(interp)) {
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
if (PyType_Ready(&PyTuple_Type) < 0) {
|
||||
return _PyStatus_ERR("Can't initialize tuple type");
|
||||
}
|
||||
|
||||
if (PyType_Ready(&PyTupleIter_Type) < 0) {
|
||||
return _PyStatus_ERR("Can't initialize tuple iterator type");
|
||||
}
|
||||
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
static void maybe_freelist_clear(PyInterpreterState *, int);
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue