summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend.aasland@protonmail.com>2023-05-10 10:59:31 (GMT)
committerGitHub <noreply@github.com>2023-05-10 10:59:31 (GMT)
commit2dcb289ed08980c8f97d538060b4ad8d5e82b56a (patch)
treed88cc54aa99fd5a90b243146791b5e8aa2350880 /Modules/_io
parent68a8ca6dc10bdceb4efaac569081b78ec01c3a99 (diff)
downloadcpython-2dcb289ed08980c8f97d538060b4ad8d5e82b56a.zip
cpython-2dcb289ed08980c8f97d538060b4ad8d5e82b56a.tar.gz
cpython-2dcb289ed08980c8f97d538060b4ad8d5e82b56a.tar.bz2
gh-101819: Clean up _io windows console io after gh-104197 (#104354)
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/_iomodule.c2
-rw-r--r--Modules/_io/_iomodule.h2
-rw-r--r--Modules/_io/winconsoleio.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 6c5ea28..ee4eca7 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -772,7 +772,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
diff --git a/Modules/_io/_iomodule.h b/Modules/_io/_iomodule.h
index b3873dd..44d6513 100644
--- a/Modules/_io/_iomodule.h
+++ b/Modules/_io/_iomodule.h
@@ -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
};
diff --git a/Modules/_io/winconsoleio.c b/Modules/_io/winconsoleio.c
index fdb57cf..58d9f29 100644
--- a/Modules/_io/winconsoleio.c
+++ b/Modules/_io/winconsoleio.c
@@ -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
_PyIO_State *state = find_io_state_by_def(Py_TYPE(self));
assert(PyObject_TypeCheck(self, state->PyWindowsConsoleIO_Type));
#endif