Kaydet (Commit) 3023ebb4 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Py_SIZE() was misused for dict.

üst cb19aeb5
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment