mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix the return value of set_discard (issue #10519)
This commit is contained in:
parent
5acc27ebe4
commit
e0aa803714
1 changed files with 3 additions and 2 deletions
|
@ -1942,9 +1942,10 @@ set_discard(PySetObject *so, PyObject *key)
|
||||||
tmpkey = make_new_set(&PyFrozenSet_Type, key);
|
tmpkey = make_new_set(&PyFrozenSet_Type, key);
|
||||||
if (tmpkey == NULL)
|
if (tmpkey == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
result = set_discard_key(so, tmpkey);
|
rv = set_discard_key(so, tmpkey);
|
||||||
Py_DECREF(tmpkey);
|
Py_DECREF(tmpkey);
|
||||||
return result;
|
if (rv == -1)
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue