Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Visit and clear win console io type in iomodule.c
  • Loading branch information
erlend-aasland committed May 6, 2023
commit 7c9065ff0458abd572dfefe40c2b127232d5d025
6 changes: 6 additions & 0 deletions Modules/_io/_iomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ iomodule_traverse(PyObject *mod, visitproc visit, void *arg) {
Py_VISIT(state->PyStringIO_Type);
Py_VISIT(state->PyTextIOBase_Type);
Py_VISIT(state->PyTextIOWrapper_Type);
#ifdef HAVE_WINDOWS_CONSOLE_IO
Py_VISIT(state->PyWindowsConsoleIO_Type);
#endif
return 0;
}

Expand All @@ -622,6 +625,9 @@ iomodule_clear(PyObject *mod) {
Py_CLEAR(state->PyStringIO_Type);
Py_CLEAR(state->PyTextIOBase_Type);
Py_CLEAR(state->PyTextIOWrapper_Type);
#ifdef HAVE_WINDOWS_CONSOLE_IO
Py_CLEAR(state->PyWindowsConsoleIO_Type);
#endif
return 0;
}

Expand Down