8000 use static strings · python/cpython@bf84334 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf84334

Browse files
use static strings
1 parent 761eeb6 commit bf84334

File tree

4 files changed

+135
-188
lines changed

4 files changed

+135
-188
lines changed

Include/internal/pycore_typeobject.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ extern "C" {
1111

1212
/* runtime lifecycle */
1313

14-
extern PyStatus _PyTypes_InitState(PyInterpreterState *);
1514
extern PyStatus _PyTypes_InitTypes(PyInterpreterState *);
1615
extern void _PyTypes_FiniTypes(PyInterpreterState *);
1716
extern void _PyTypes_Fini(PyInterpreterState *);
@@ -39,8 +38,6 @@ struct type_cache {
3938
#endif
4039
};
4140

42-
extern PyStatus _PyTypes_InitSlotDefs(void);
43-
4441
extern void _PyStaticType_Dealloc(PyTypeObject *type);
4542

4643

Objects/object.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
1515
#include "pycore_pystate.h" // _PyThreadState_GET()
1616
#include "pycore_symtable.h" // PySTEntry_Type
17-
#include "pycore_typeobject.h" // _PyTypes_InitSlotDefs()
1817
#include "pycore_unionobject.h" // _PyUnion_Type
1918
#include "pycore_interpreteridobject.h" // _PyInterpreterID_Type
2019

@@ -1818,23 +1817,6 @@ PyObject _Py_NotImplementedStruct = {
18181817
1, &_PyNotImplemented_Type
18191818
};
18201819

1821-
PyStatus
1822-
_PyTypes_InitState(PyInterpreterState *interp)
1823-
{
1824-
if (!_Py_IsMainInterpreter(interp)) {
1825-
return _PyStatus_OK();
1826-
}
1827-
1828-
PyStatus status = _PyTypes_InitSlotDefs();
1829-
if (_PyStatus_EXCEPTION(status)) {
1830-
return status;
1831-
}
1832-
1833-
return _PyStatus_OK();
1834-
}
1835-
1836-
1837-
18381820
#ifdef MS_WINDOWS
18391821
extern PyTypeObject PyHKEY_Type;
18401822
#endif

0 commit comments

Comments
 (0)
0