]> granicus.if.org Git - python/commitdiff
Avoid unnecessary recursive function calls (closes #10519)
authorPetri Lehtinen <petri@digip.org>
Sun, 30 Oct 2011 11:55:02 +0000 (13:55 +0200)
committerPetri Lehtinen <petri@digip.org>
Sun, 30 Oct 2011 11:55:56 +0000 (13:55 +0200)
Objects/setobject.c

index 802f45f4c436d5b3d22b570bc8b4a4148bcab0e3..9fea0c96f102b64e0db9fcf98b3cea2191741a42 100644 (file)
@@ -1871,7 +1871,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;
@@ -1936,7 +1936,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;
     }