mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
GH-90699: use statically allocated interned strings in typeobject's slotdefs (GH-94706)
This commit is contained in:
parent
b65686c505
commit
4e4bfffe2d
5 changed files with 140 additions and 176 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue