diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-04-27 22:19:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 22:19:43 (GMT) |
commit | d2e2e53f733f8c8098035bbbc452bd1892796cb3 (patch) | |
tree | 4f01c11ff1f6ad9ebbcd4786bca991878226a4c6 /Objects/exceptions.c | |
parent | 56c7176d1de3a0770085cad3865c1de42ba86f42 (diff) | |
download | cpython-d2e2e53f733f8c8098035bbbc452bd1892796cb3.zip cpython-d2e2e53f733f8c8098035bbbc452bd1892796cb3.tar.gz cpython-d2e2e53f733f8c8098035bbbc452bd1892796cb3.tar.bz2 |
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.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r-- | Objects/exceptions.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 55a6768..6c9dfbd 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -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) { |