summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-31 01:08:32 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-31 01:08:32 (GMT)
commitdb96789ba7dd79438ca01d21d5f62a3adda2ffeb (patch)
tree1df17d11691d08c34e973a90611c86968b22677a
parentfab2b305a29c374e2eb3965202364405b6c0a81e (diff)
downloadcpython-db96789ba7dd79438ca01d21d5f62a3adda2ffeb.zip
cpython-db96789ba7dd79438ca01d21d5f62a3adda2ffeb.tar.gz
cpython-db96789ba7dd79438ca01d21d5f62a3adda2ffeb.tar.bz2
Fixed r60466
-rw-r--r--Include/setobject.h1
-rw-r--r--Objects/setobject.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index e21100a..c8e2702 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -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);
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 1fa8dda..4cf47bd 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -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++;