commit | 98c65bed91432bf17a335382cdd672b16391f10c | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Oct 09 03:47:08 2003 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Oct 09 03:47:08 2003 +0000 |
tree | 16a051e107763d29223121baa186ca4792084eb1 | |
parent | 22c3dda1e64f413d4f6781d983067d580567071b [diff] [blame] |
Return a bool rather than an int from proxy_has_key().
diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 745f95d..ec4ea56 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c
@@ -709,7 +709,10 @@ static PyObject * proxy_has_key(proxyobject *pp, PyObject *key) { - return PyInt_FromLong(PySequence_Contains(pp->dict, key)); + int res = PySequence_Contains(pp->dict, key); + if (res < 0) + return NULL; + return PyBool_FromLong(res); } static PyObject *