Commit 98c65bed authored by Guido van Rossum's avatar Guido van Rossum

Return a bool rather than an int from proxy_has_key().

parent 22c3dda1
......@@ -709,7 +709,10 @@ static PySequenceMethods proxy_as_sequence = {
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 *
......
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