diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2004-07-08 01:22:31 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2004-07-08 01:22:31 (GMT) |
commit | bdcb9410c20c49928c91b065ccbd115aa450e037 (patch) | |
tree | 2d3922fdf383427b27030446e5dbc9216fc3554b /Objects | |
parent | bd7f76dd04780304c397323ae994092ce759d5a2 (diff) | |
download | cpython-bdcb9410c20c49928c91b065ccbd115aa450e037.zip cpython-bdcb9410c20c49928c91b065ccbd115aa450e037.tar.gz cpython-bdcb9410c20c49928c91b065ccbd115aa450e037.tar.bz2 |
SF bug #978308, Spurious errors taking bool of dead pro
Need to return -1 on error.
Needs backport.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/weakrefobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 572c224..54fe446 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -504,7 +504,7 @@ proxy_nonzero(PyWeakReference *proxy) { PyObject *o = PyWeakref_GET_OBJECT(proxy); if (!proxy_checkref(proxy)) - return 1; + return -1; if (o->ob_type->tp_as_number && o->ob_type->tp_as_number->nb_nonzero) return (*o->ob_type->tp_as_number->nb_nonzero)(o); |