[Python-checkins] python/dist/src/Include setobject.h,2.9,2.10

rhettinger@users.sourceforge.net rhettinger at users.sourceforge.net
Tue Aug 16 05:48:02 CEST 2005


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31184/Include

Modified Files:
	setobject.h 
Log Message:
Add a C API for sets and frozensets.

Index: setobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/setobject.h,v
retrieving revision 2.9
retrieving revision 2.10
diff -u -d -r2.9 -r2.10
--- setobject.h	7 Aug 2005 13:02:52 -0000	2.9
+++ setobject.h	16 Aug 2005 03:47:51 -0000	2.10
@@ -74,6 +74,15 @@
 	  PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \
 	  PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
 
+PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
+PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
+PyAPI_FUNC(int) PySet_Size(PyObject *anyset);
+#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
+PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
+PyAPI_FUNC(int) PySet_Discard(PyObject *anyset, PyObject *key);
+PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key);
+PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
+
 #ifdef __cplusplus
 }
 #endif



More information about the Python-checkins mailing list