mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Avoid unnecessary recursive function calls (closes #10519)
This commit is contained in:
parent
f54f6f520d
commit
5acc27ebe4
1 changed files with 2 additions and 2 deletions
|
@ -1877,7 +1877,7 @@ set_contains(PySetObject *so, PyObject *key)
|
|||
tmpkey = make_new_set(&PyFrozenSet_Type, key);
|
||||
if (tmpkey == NULL)
|
||||
return -1;
|
||||
rv = set_contains(so, tmpkey);
|
||||
rv = set_contains_key(so, tmpkey);
|
||||
Py_DECREF(tmpkey);
|
||||
}
|
||||
return rv;
|
||||
|
@ -1942,7 +1942,7 @@ set_discard(PySetObject *so, PyObject *key)
|
|||
tmpkey = make_new_set(&PyFrozenSet_Type, key);
|
||||
if (tmpkey == NULL)
|
||||
return NULL;
|
||||
result = set_discard(so, tmpkey);
|
||||
result = set_discard_key(so, tmpkey);
|
||||
Py_DECREF(tmpkey);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue