]> granicus.if.org Git - python/commitdiff
Fixed r60466
authorChristian Heimes <christian@cheimes.de>
Thu, 31 Jan 2008 01:08:32 +0000 (01:08 +0000)
committerChristian Heimes <christian@cheimes.de>
Thu, 31 Jan 2008 01:08:32 +0000 (01:08 +0000)
Include/setobject.h
Objects/setobject.c

index e21100a5b31939f58776f284654b7f9146047e6a..c8e27021bc1e1187d238660cb45fd47517bd0d52 100644 (file)
@@ -85,7 +85,6 @@ PyAPI_FUNC(int) PySet_Clear(PyObject *set);
 PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
 PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
 PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key);
-PyAPI_FUNC(int) _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key);
 PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash);
 PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
 PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
index 1fa8dda6997a3d2fc79de54aa5fd2d05305772ab..4cf47bd80cad3e0670d7c73edd5175b0486ff9df 100644 (file)
@@ -2236,6 +2236,7 @@ test_c_api(PySetObject *so)
        Py_ssize_t i;
        PyObject *elem=NULL, *dup=NULL, *t, *f, *dup2, *x;
        PyObject *ob = (PyObject *)so;
+       long hash;
 
        /* Verify preconditions and exercise type/size checks */
        assert(PyAnySet_Check(ob));
@@ -2280,7 +2281,7 @@ test_c_api(PySetObject *so)
 
        /* Exercise direct iteration */
        i = 0, count = 0;
-       while (_PySet_Next((PyObject *)dup, &i, &x)) {
+       while (_PySet_NextEntry((PyObject *)dup, &i, &x, &hash)) {
                s = PyUnicode_AsString(x);
                assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
                count++;