| commit | 7083bb744a552ab2bf31500763ace783d12f6fb8 | [log] [tgz] |
|---|---|---|
| author | Jeremy Hylton <jeremy@alum.mit.edu> | Tue Feb 17 20:10:11 2004 +0000 |
| committer | Jeremy Hylton <jeremy@alum.mit.edu> | Tue Feb 17 20:10:11 2004 +0000 |
| tree | 40675661a1875cd1f3658e28dc35471084ccf6c9 | |
| parent | 9eb86b3c7cd44831735392f67ae3d97f859271ba [diff] |
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.
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 35a3e31..eb0222c 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c
@@ -1256,7 +1256,7 @@ { if (mp == NULL || !PyDict_Check(mp)) { PyErr_BadInternalCall(); - return 0; + return -1; } return ((dictobject *)mp)->ma_used; }