diff options
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/textio.c | 2 | ||||
-rw-r--r-- | Modules/_io/winconsoleio.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index dca4ea9..2f55eb0 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1023,7 +1023,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, else if (PyUnicode_Check(res)) { const encodefuncentry *e = encodefuncs; while (e->name != NULL) { - if (!PyUnicode_CompareWithASCIIString(res, e->name)) { + if (_PyUnicode_EqualToASCIIString(res, e->name)) { self->encodefunc = e->encodefunc; break; } diff --git a/Modules/_io/winconsoleio.c b/Modules/_io/winconsoleio.c index 4666a38..7b00a9e 100644 --- a/Modules/_io/winconsoleio.c +++ b/Modules/_io/winconsoleio.c @@ -93,11 +93,11 @@ char _PyIO_get_console_type(PyObject *path_or_fd) { } char m = '\0'; - if (PyUnicode_CompareWithASCIIString(decoded_upper, "CONIN$") == 0) { + if (_PyUnicode_EqualToASCIIString(decoded_upper, "CONIN$")) { m = 'r'; - } else if (PyUnicode_CompareWithASCIIString(decoded_upper, "CONOUT$") == 0) { + } else if (_PyUnicode_EqualToASCIIString(decoded_upper, "CONOUT$")) { m = 'w'; - } else if (PyUnicode_CompareWithASCIIString(decoded_upper, "CON") == 0) { + } else if (_PyUnicode_EqualToASCIIString(decoded_upper, "CON")) { m = 'x'; } |