commit | 3023ebb43f7607584c3e123aff56e867cb04a418 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 13 08:34:34 2017 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 13 08:34:34 2017 +0200 |
tree | a3489712ed3292964f67b22cbeafbeefcbed902f | |
parent | cb19aeb5500074a954a68dd54c7c3648b0887f08 [diff] [blame] |
Py_SIZE() was misused for dict.
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 @@ 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) {