gh-101819: Remove unused 'locale_module' from _io state (#104246)

The locale module reference was introduced by 932ff8368 in 2013,
and rendered unused by 710e82630 (gh-23050) in 2020.
This commit is contained in:
Erlend E. Aasland 2023-05-06 22:26:06 +02:00 committed by GitHub
parent de7f694e3c
commit 3b14b51d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 5 deletions

View File

@ -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);

View File

@ -143,8 +143,6 @@ extern PyModuleDef _PyIO_Module;
typedef struct {
int initialized;
PyObject *locale_module;
PyObject *unsupported_operation;
/* Types */