mirror of https://github.com/python/cpython.git
gh-101819: Remove unused 'locale_module' from _io state (#104246)
The locale module reference was introduced by932ff8368
in 2013, and rendered unused by710e82630
(gh-23050) in 2020.
This commit is contained in:
parent
de7f694e3c
commit
3b14b51d11
|
@ -580,7 +580,6 @@ iomodule_traverse(PyObject *mod, visitproc visit, void *arg) {
|
|||
_PyIO_State *state = get_io_state(mod);
|
||||
if (!state->initialized)
|
||||
return 0;
|
||||
Py_VISIT(state->locale_module);
|
||||
Py_VISIT(state->unsupported_operation);
|
||||
|
||||
Py_VISIT(state->PyIncrementalNewlineDecoder_Type);
|
||||
|
@ -605,8 +604,6 @@ iomodule_clear(PyObject *mod) {
|
|||
_PyIO_State *state = get_io_state(mod);
|
||||
if (!state->initialized)
|
||||
return 0;
|
||||
if (state->locale_module != NULL)
|
||||
Py_CLEAR(state->locale_module);
|
||||
Py_CLEAR(state->unsupported_operation);
|
||||
|
||||
Py_CLEAR(state->PyIncrementalNewlineDecoder_Type);
|
||||
|
|
|
@ -143,8 +143,6 @@ extern PyModuleDef _PyIO_Module;
|
|||
|
||||
typedef struct {
|
||||
int initialized;
|
||||
PyObject *locale_module;
|
||||
|
||||
PyObject *unsupported_operation;
|
||||
|
||||
/* Types */
|
||||
|
|
Loading…
Reference in New Issue