summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-16 16:17:49 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-16 16:17:49 (GMT)
commita690a9967e715663b7a421c9ebdad91381cdf1e4 (patch)
tree1c5d9eeef0ac20efe39f1af11a81d745592596d1 /Include
parentd456849f19fa7b00b6560b67c5388a5a6cd89d0a (diff)
downloadcpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.zip
cpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.tar.gz
cpython-a690a9967e715663b7a421c9ebdad91381cdf1e4.tar.bz2
* Migrate set() and frozenset() from the sandbox.
* Install the unittests, docs, newsitem, include file, and makefile update. * Exercise the new functions whereever sets.py was being used. Includes the docs for libfuncs.tex. Separate docs for the types are forthcoming.
Diffstat (limited to 'Include')
-rw-r--r--Include/Python.h1
-rw-r--r--Include/setobject.h26
2 files changed, 27 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 26d2211..9379c66 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -86,6 +86,7 @@
#include "listobject.h"
#include "dictobject.h"
#include "enumobject.h"
+#include "setobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"
diff --git a/Include/setobject.h b/Include/setobject.h
new file mode 100644
index 0000000..eeffa8a
--- /dev/null
+++ b/Include/setobject.h
@@ -0,0 +1,26 @@
+
+/* Set object interface */
+
+#ifndef Py_SETOBJECT_H
+#define Py_SETOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+This data structure is shared by set and frozenset objects.
+*/
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *data;
+ long hash; /* only used by frozenset objects */
+} PySetObject;
+
+PyAPI_DATA(PyTypeObject) PySet_Type;
+PyAPI_DATA(PyTypeObject) PyFrozenSet_Type;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_SETOBJECT_H */