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

Commit 2dcb289

Browse filesBrowse files
gh-101819: Clean up _io windows console io after gh-104197 (#104354)
1 parent 68a8ca6 commit 2dcb289
Copy full SHA for 2dcb289

File tree

3 files changed

+3
-3
lines changed
Filter options

3 files changed

+3
-3
lines changed

‎Modules/_io/_iomodule.c

Copy file name to clipboardExpand all lines: Modules/_io/_iomodule.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ PyInit__io(void)
772772

773773
// PyRawIOBase_Type(PyIOBase_Type) subclasses
774774
ADD_TYPE(m, state->PyFileIO_Type, &fileio_spec, state->PyRawIOBase_Type);
775-
#ifdef MS_WINDOWS
775+
#ifdef HAVE_WINDOWS_CONSOLE_IO
776776
ADD_TYPE(m, state->PyWindowsConsoleIO_Type, &winconsoleio_spec,
777777
state->PyRawIOBase_Type);
778778
#endif

‎Modules/_io/_iomodule.h

Copy file name to clipboardExpand all lines: Modules/_io/_iomodule.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ struct _io_state {
162162
PyTypeObject *PyStringIO_Type;
163163
PyTypeObject *PyTextIOBase_Type;
164164
PyTypeObject *PyTextIOWrapper_Type;
165-
#ifdef MS_WINDOWS
165+
#ifdef HAVE_WINDOWS_CONSOLE_IO
166166
PyTypeObject *PyWindowsConsoleIO_Type;
167167
#endif
168168
};

‎Modules/_io/winconsoleio.c

Copy file name to clipboardExpand all lines: Modules/_io/winconsoleio.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ _io__WindowsConsoleIO___init___impl(winconsoleio *self, PyObject *nameobj,
263263
int fd_is_own = 0;
264264
HANDLE handle = NULL;
265265

266-
#ifdef Py_DEBUG
266+
#ifdef NDEBUG
267267
_PyIO_State *state = find_io_state_by_def(Py_TYPE(self));
268268
assert(PyObject_TypeCheck(self, state->PyWindowsConsoleIO_Type));
269269
#endif

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.