Commit 5acc27eb authored by Petri Lehtinen's avatar Petri Lehtinen

Avoid unnecessary recursive function calls (closes #10519)

parent f54f6f52
...@@ -1877,7 +1877,7 @@ set_contains(PySetObject *so, PyObject *key) ...@@ -1877,7 +1877,7 @@ set_contains(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 -1; return -1;
rv = set_contains(so, tmpkey); rv = set_contains_key(so, tmpkey);
Py_DECREF(tmpkey); Py_DECREF(tmpkey);
} }
return rv; return rv;
...@@ -1942,7 +1942,7 @@ set_discard(PySetObject *so, PyObject *key) ...@@ -1942,7 +1942,7 @@ 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(so, tmpkey); result = set_discard_key(so, tmpkey);
Py_DECREF(tmpkey); Py_DECREF(tmpkey);
return result; return result;
} }
......
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