mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +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
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include "Python.h"
|
||||
|
||||
#include "pycore_bytesobject.h" // _PyBytes_InitTypes()
|
||||
#include "pycore_ceval.h" // _PyEval_FiniGIL()
|
||||
#include "pycore_context.h" // _PyContext_Init()
|
||||
#include "pycore_exceptions.h" // _PyExc_InitTypes()
|
||||
|
@ -26,7 +25,6 @@
|
|||
#include "pycore_sliceobject.h" // _PySlice_Fini()
|
||||
#include "pycore_sysmodule.h" // _PySys_ClearAuditHooks()
|
||||
#include "pycore_traceback.h" // _Py_DumpTracebackThreads()
|
||||
#include "pycore_tuple.h" // _PyTuple_InitTypes()
|
||||
#include "pycore_typeobject.h" // _PyTypes_InitTypes()
|
||||
#include "pycore_unicodeobject.h" // _PyUnicode_InitTypes()
|
||||
#include "opcode.h"
|
||||
|
@ -684,11 +682,6 @@ pycore_init_types(PyInterpreterState *interp)
|
|||
return status;
|
||||
}
|
||||
|
||||
status = _PyBytes_InitTypes(interp);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
status = _PyLong_InitTypes(interp);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
|
@ -704,11 +697,6 @@ pycore_init_types(PyInterpreterState *interp)
|
|||
return status;
|
||||
}
|
||||
|
||||
status = _PyTuple_InitTypes(interp);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if (_PyExc_InitTypes(interp) < 0) {
|
||||
return _PyStatus_ERR("failed to initialize an exception type");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue