mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-101819: Clean up _io windows console io after gh-104197 (#104354)
This commit is contained in:
parent
68a8ca6dc1
commit
2dcb289ed0
3 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue