Commit 7083bb74 authored by Jeremy Hylton's avatar Jeremy Hylton

Oops. Return -1 to distinguish error from empty dict.

This change probably isn't work a bug fix.  It's unlikely that anyone
was calling this method without passing it a real dict.
parent 9eb86b3c
......@@ -1256,7 +1256,7 @@ PyDict_Size(PyObject *mp)
{
if (mp == NULL || !PyDict_Check(mp)) {
PyErr_BadInternalCall();
return 0;
return -1;
}
return ((dictobject *)mp)->ma_used;
}
......
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