Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-101819: Clean up _io windows console io after gh-104197 #104354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion 2 Modules/_io/_iomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ PyInit__io(void)

// PyRawIOBase_Type(PyIOBase_Type) subclasses
ADD_TYPE(m, state->PyFileIO_Type, &fileio_spec, state->PyRawIOBase_Type);
#ifdef MS_WINDOWS
#ifdef HAVE_WINDOWS_CONSOLE_IO
ADD_TYPE(m, state->PyWindowsConsoleIO_Type, &winconsoleio_spec,
state->PyRawIOBase_Type);
#endif
Expand Down
2 changes: 1 addition & 1 deletion 2 Modules/_io/_iomodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct _io_state {
PyTypeObject *PyStringIO_Type;
PyTypeObject *PyTextIOBase_Type;
PyTypeObject *PyTextIOWrapper_Type;
#ifdef MS_WINDOWS
#ifdef HAVE_WINDOWS_CONSOLE_IO
PyTypeObject *PyWindowsConsoleIO_Type;
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion 2 Modules/_io/winconsoleio.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ _io__WindowsConsoleIO___init___impl(winconsoleio *self, PyObject *nameobj,
int fd_is_own = 0;
HANDLE handle = NULL;

#ifdef Py_DEBUG
#ifdef NDEBUG
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved
_PyIO_State *state = find_io_state_by_def(Py_TYPE(self));
assert(PyObject_TypeCheck(self, state->PyWindowsConsoleIO_Type));
#endif
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.