[Python-checkins] python/dist/src/Objects descrobject.c,2.36,2.37
gvanrossum at users.sourceforge.net
gvanrossum at users.sourceforge.net
Wed Oct 8 23:47:10 EDT 2003
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv27765
Modified Files:
descrobject.c
Log Message:
Return a bool rather than an int from proxy_has_key().
Index: descrobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/descrobject.c,v
retrieving revision 2.36
retrieving revision 2.37
diff -C2 -d -r2.36 -r2.37
*** descrobject.c 1 Sep 2003 22:12:07 -0000 2.36
--- descrobject.c 9 Oct 2003 03:47:08 -0000 2.37
***************
*** 710,714 ****
proxy_has_key(proxyobject *pp, PyObject *key)
{
! return PyInt_FromLong(PySequence_Contains(pp->dict, key));
}
--- 710,717 ----
proxy_has_key(proxyobject *pp, PyObject *key)
{
! int res = PySequence_Contains(pp->dict, key);
! if (res < 0)
! return NULL;
! return PyBool_FromLong(res);
}
More information about the Python-checkins
mailing list