summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bytesio.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-21 06:53:25 (GMT)
committerGitHub <noreply@github.com>2017-03-21 06:53:25 (GMT)
commitfff9a31a91283c39c363af219e595eab7d4da6f7 (patch)
tree0dfdec9e4e3e7caec6804bcc1fef1f2c19b9e532 /Modules/_io/bytesio.c
parentc61ac1642d19f54c7b755098230967ad2e603180 (diff)
downloadcpython-fff9a31a91283c39c363af219e595eab7d4da6f7.zip
cpython-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.gz
cpython-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.bz2
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748)
Diffstat (limited to 'Modules/_io/bytesio.c')
-rw-r--r--Modules/_io/bytesio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 59b917d..f78b447 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -822,7 +822,7 @@ bytesio_setstate(bytesio *self, PyObject *state)
/* We allow the state tuple to be longer than 3, because we may need
someday to extend the object's state without breaking
backward-compatibility. */
- if (!PyTuple_Check(state) || Py_SIZE(state) < 3) {
+ if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) < 3) {
PyErr_Format(PyExc_TypeError,
"%.200s.__setstate__ argument should be 3-tuple, got %.200s",
Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name);