GH-90699: use statically allocated interned strings in typeobject's slotdefs (GH-94706)

This commit is contained in:
Kumar Aditya 2022-09-08 03:32:08 +05:30 committed by GitHub
parent b65686c505
commit 4e4bfffe2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 140 additions and 176 deletions

View file

@ -14,7 +14,6 @@
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_symtable.h" // PySTEntry_Type
#include "pycore_typeobject.h" // _PyTypes_InitSlotDefs()
#include "pycore_unionobject.h" // _PyUnion_Type
#include "pycore_interpreteridobject.h" // _PyInterpreterID_Type
@ -1835,23 +1834,6 @@ PyObject _Py_NotImplementedStruct = {
1, &_PyNotImplemented_Type
};
PyStatus
_PyTypes_InitState(PyInterpreterState *interp)
{
if (!_Py_IsMainInterpreter(interp)) {
return _PyStatus_OK();
}
PyStatus status = _PyTypes_InitSlotDefs();
if (_PyStatus_EXCEPTION(status)) {
return status;
}
return _PyStatus_OK();
}
#ifdef MS_WINDOWS
extern PyTypeObject PyHKEY_Type;
#endif