diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 06:34:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 06:34:34 (GMT) |
commit | 3023ebb43f7607584c3e123aff56e867cb04a418 (patch) | |
tree | a3489712ed3292964f67b22cbeafbeefcbed902f /Modules/_json.c | |
parent | cb19aeb5500074a954a68dd54c7c3648b0887f08 (diff) | |
download | cpython-3023ebb43f7607584c3e123aff56e867cb04a418.zip cpython-3023ebb43f7607584c3e123aff56e867cb04a418.tar.gz cpython-3023ebb43f7607584c3e123aff56e867cb04a418.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 47c9b0d..8cbf2e4 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) { |