summaryrefslogtreecommitdiffstats
path: root/Modules/_json.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/_json.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/_json.c')
-rw-r--r--Modules/_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index f4000f8..28fdc79 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -1654,7 +1654,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
idx = 0;
while ((item = PyIter_Next(it)) != NULL) {
PyObject *encoded, *key, *value;
- if (!PyTuple_Check(item) || Py_SIZE(item) != 2) {
+ if (!PyTuple_Check(item) || PyTuple_GET_SIZE(item) != 2) {
PyErr_SetString(PyExc_ValueError, "items must return 2-tuples");
goto bail;
}