diff options
author | Andy Lester <andy@petdance.com> | 2020-03-04 13:15:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 13:15:20 (GMT) |
commit | dffe4c07095e0c693e094d3c140e85a68bd8128e (patch) | |
tree | 1f58f4c2f76d6f630c5279a7b72d31bb6b4d8873 /Modules/_io/bufferedio.c | |
parent | 22a9a546ff3bf2a63d77ca1e5494e758bc59132f (diff) | |
download | cpython-dffe4c07095e0c693e094d3c140e85a68bd8128e.zip cpython-dffe4c07095e0c693e094d3c140e85a68bd8128e.tar.gz cpython-dffe4c07095e0c693e094d3c140e85a68bd8128e.tar.bz2 |
bpo-39573: Finish converting to new Py_IS_TYPE() macro (GH-18601)
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r-- | Modules/_io/bufferedio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index a09082c..f2d0467 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -1449,8 +1449,8 @@ _io_BufferedReader___init___impl(buffered *self, PyObject *raw, return -1; _bufferedreader_reset_buf(self); - self->fast_closed_checks = (Py_TYPE(self) == &PyBufferedReader_Type && - Py_TYPE(raw) == &PyFileIO_Type); + self->fast_closed_checks = (Py_IS_TYPE(self, &PyBufferedReader_Type) && + Py_IS_TYPE(raw, &PyFileIO_Type)); self->ok = 1; return 0; @@ -1795,8 +1795,8 @@ _io_BufferedWriter___init___impl(buffered *self, PyObject *raw, _bufferedwriter_reset_buf(self); self->pos = 0; - self->fast_closed_checks = (Py_TYPE(self) == &PyBufferedWriter_Type && - Py_TYPE(raw) == &PyFileIO_Type); + self->fast_closed_checks = (Py_IS_TYPE(self, &PyBufferedWriter_Type) && + Py_IS_TYPE(raw, &PyFileIO_Type)); self->ok = 1; return 0; @@ -2309,8 +2309,8 @@ _io_BufferedRandom___init___impl(buffered *self, PyObject *raw, _bufferedwriter_reset_buf(self); self->pos = 0; - self->fast_closed_checks = (Py_TYPE(self) == &PyBufferedRandom_Type && - Py_TYPE(raw) == &PyFileIO_Type); + self->fast_closed_checks = (Py_IS_TYPE(self, &PyBufferedRandom_Type) && + Py_IS_TYPE(raw, &PyFileIO_Type)); self->ok = 1; return 0; |