summaryrefslogtreecommitdiffstats
path: root/Include/setobject.h
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2006-03-30 22:45:35 (GMT)
committerBarry Warsaw <barry@python.org>2006-03-30 22:45:35 (GMT)
commit176014ffad8d39820293b63bf7177a7d2953343a (patch)
treef1a112b22c88952a952794d390291ec54a0818d1 /Include/setobject.h
parentc259cc9c4c1c90efaeace2c9786786a5813cf950 (diff)
downloadcpython-176014ffad8d39820293b63bf7177a7d2953343a.zip
cpython-176014ffad8d39820293b63bf7177a7d2953343a.tar.gz
cpython-176014ffad8d39820293b63bf7177a7d2953343a.tar.bz2
SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and _PySet_Update(). The latter two are considered non-public. Tests and documentation (for the public API) are included.
Diffstat (limited to 'Include/setobject.h')
-rw-r--r--Include/setobject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index cea95cc..cc93968 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -78,10 +78,13 @@ PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
+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 **entry);
PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
+PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
#ifdef __cplusplus
}