Avoid unnecessary recursive function calls (closes #10519)

This commit is contained in:
Petri Lehtinen 2011-10-30 13:55:02 +02:00
parent 59dba38166
commit 5f4d870668
1 changed files with 2 additions and 2 deletions

View File

@ -1871,7 +1871,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;
@ -1936,7 +1936,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;
} }