mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
|
|
@ -3596,10 +3596,6 @@ static struct static_exception static_exceptions[] = {
|
|||
int
|
||||
_PyExc_InitTypes(PyInterpreterState *interp)
|
||||
{
|
||||
if (!_Py_IsMainInterpreter(interp)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (size_t i=0; i < Py_ARRAY_LENGTH(static_exceptions); i++) {
|
||||
PyTypeObject *exc = static_exceptions[i].exc;
|
||||
if (_PyStaticType_InitBuiltin(exc) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue