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

index 48edad8a31a32547773f2d567e2a0ef2c84aec4e..9f39fcbadbc4df391960b32153408713c15b9bb1 100644 (file)
@@ -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;
     }