Skip to content

Commit

Permalink
pythongh-101819: Remove unused 'locale_module' from _io state (python…
Browse files Browse the repository at this point in the history
…#104246)

The locale module reference was introduced by 932ff83 in 2013,
and rendered unused by 710e826 (pythongh-23050) in 2020.
  • Loading branch information
erlend-aasland authored and jbower-fb committed May 8, 2023
1 parent a719df1 commit 060a31e
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 060a31e

Please sign in to comment.