diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-04-27 16:19:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 16:19:43 -0600 |
commit | d2e2e53f733f8c8098035bbbc452bd1892796cb3 (patch) | |
tree | 4f01c11ff1f6ad9ebbcd4786bca991878226a4c6 /Objects/longobject.c | |
parent | 56c7176d1de3a0770085cad3865c1de42ba86f42 (diff) | |
download | cpython-git-d2e2e53f733f8c8098035bbbc452bd1892796cb3.tar.gz |
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/longobject.c')
-rw-r--r-- | Objects/longobject.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index d98bbbb6d6..f84809b8a8 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -6351,19 +6351,9 @@ PyLong_GetInfo(void) PyStatus _PyLong_InitTypes(PyInterpreterState *interp) { - if (!_Py_IsMainInterpreter(interp)) { - return _PyStatus_OK(); - } - - if (PyType_Ready(&PyLong_Type) < 0) { - return _PyStatus_ERR("Can't initialize int type"); - } - /* initialize int_info */ - if (Int_InfoType.tp_name == NULL) { - if (_PyStructSequence_InitBuiltin(&Int_InfoType, &int_info_desc) < 0) { - return _PyStatus_ERR("can't init int info type"); - } + if (_PyStructSequence_InitBuiltin(&Int_InfoType, &int_info_desc) < 0) { + return _PyStatus_ERR("can't init int info type"); } return _PyStatus_OK(); |