diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 06:37:05 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 06:37:05 (GMT) |
commit | a6758427fd96741c6a8a1506f933bb0107d2b0a7 (patch) | |
tree | 5292b7638758550dc662ee908b72c7babb5e6b91 /Modules/_json.c | |
parent | 9d83b96ce1ada3a9ef0489d51426f2626d5bad38 (diff) | |
parent | 3023ebb43f7607584c3e123aff56e867cb04a418 (diff) | |
download | cpython-a6758427fd96741c6a8a1506f933bb0107d2b0a7.zip cpython-a6758427fd96741c6a8a1506f933bb0107d2b0a7.tar.gz cpython-a6758427fd96741c6a8a1506f933bb0107d2b0a7.tar.bz2 |
Py_SIZE() was misused for dict.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 5b3d803..faa2134 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -1609,7 +1609,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc, if (open_dict == NULL || close_dict == NULL || empty_dict == NULL) return -1; } - if (Py_SIZE(dct) == 0) + if (PyDict_Size(dct) == 0) /* Fast path */ return _PyAccu_Accumulate(acc, empty_dict); if (s->markers != Py_None) { |