Skip to content

Commit

Permalink
gh-101819: Remove unused 'locale_module' from _io state (#104246)
Browse files Browse the repository at this point in the history
The locale module reference was introduced by 932ff83 in 2013,
and rendered unused by 710e826 (gh-23050) in 2020.
  • Loading branch information
erlend-aasland committed May 6, 2023
1 parent de7f694 commit 3b14b51
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Modules/_io/_iomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions Modules/_io/_iomodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ extern PyModuleDef _PyIO_Module;

typedef struct {
int initialized;
PyObject *locale_module;

PyObject *unsupported_operation;

/* Types */
Expand Down

0 comments on commit 3b14b51

Please sign in to comment.