[Python-checkins] cpython (merge 3.2 -> default): Fix the return value of set_discard (issue #10519)
petri.lehtinen
python-checkins at python.org
Sun Oct 30 13:38:35 CET 2011
http://hg.python.org/cpython/rev/f634102aca01
changeset: 73204:f634102aca01
parent: 73201:a5c4ae15b59d
parent: 73203:b643458a0108
user: Petri Lehtinen <petri at digip.org>
date: Sun Oct 30 14:35:39 2011 +0200
summary:
Fix the return value of set_discard (issue #10519)
files:
Objects/setobject.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Objects/setobject.c b/Objects/setobject.c
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1917,9 +1917,10 @@
tmpkey = make_new_set(&PyFrozenSet_Type, key);
if (tmpkey == NULL)
return NULL;
- result = set_discard_key(so, tmpkey);
+ rv = set_discard_key(so, tmpkey);
Py_DECREF(tmpkey);
- return result;
+ if (rv == -1)
+ return NULL;
}
Py_RETURN_NONE;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list