[Python-checkins] python/dist/src/Objects dictobject.c,2.150,2.151
jhylton at users.sourceforge.net
jhylton at users.sourceforge.net
Tue Feb 17 15:10:14 EST 2004
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7265
Modified Files:
dictobject.c
Log Message:
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.
Index: dictobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v
retrieving revision 2.150
retrieving revision 2.151
diff -C2 -d -r2.150 -r2.151
*** dictobject.c 13 Dec 2003 13:31:55 -0000 2.150
--- dictobject.c 17 Feb 2004 20:10:11 -0000 2.151
***************
*** 1257,1261 ****
if (mp == NULL || !PyDict_Check(mp)) {
PyErr_BadInternalCall();
! return 0;
}
return ((dictobject *)mp)->ma_used;
--- 1257,1261 ----
if (mp == NULL || !PyDict_Check(mp)) {
PyErr_BadInternalCall();
! return -1;
}
return ((dictobject *)mp)->ma_used;
More information about the Python-checkins
mailing list