]> granicus.if.org Git - python/commitdiff
Forward port r62848.
authorRaymond Hettinger <python@rcn.com>
Thu, 8 May 2008 16:02:10 +0000 (16:02 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 8 May 2008 16:02:10 +0000 (16:02 +0000)
Objects/setobject.c

index fcc152a7a4769d61efe047756eb2f7eac516f768..2fd03afb8b8054cebfbe3e26751e5925c1576c4d 100644 (file)
@@ -1743,7 +1743,7 @@ set_contains(PySetObject *so, PyObject *key)
 
        rv = set_contains_key(so, key);
        if (rv == -1) {
-               if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+               if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
                        return -1;
                PyErr_Clear();
                tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
@@ -1778,7 +1778,7 @@ set_remove(PySetObject *so, PyObject *key)
 
        rv = set_discard_key(so, key);
        if (rv == -1) {
-               if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+               if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
                        return NULL;
                PyErr_Clear();
                tmpkey = make_new_set(&PyFrozenSet_Type, NULL);
@@ -1809,7 +1809,7 @@ set_discard(PySetObject *so, PyObject *key)
 
        rv = set_discard_key(so, key);
        if (rv == -1) {
-               if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
+               if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))
                        return NULL;
                PyErr_Clear();
                tmpkey = make_new_set(&PyFrozenSet_Type, NULL);