From: Serhiy Storchaka Date: Fri, 13 Jan 2017 06:34:34 +0000 (+0200) Subject: Py_SIZE() was misused for dict. X-Git-Tag: v3.6.1rc1~176^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3023ebb43f7607584c3e123aff56e867cb04a418;p=thirdparty%2FPython%2Fcpython.git Py_SIZE() was misused for dict. --- diff --git a/Modules/_json.c b/Modules/_json.c index 47c9b0d2f775..8cbf2e405869 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) {