source: trunk/essentials/dev-lang/python/Include/setobject.h@ 3404

Last change on this file since 3404 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.6 KB
Line 
1/* Set object interface */
2
3#ifndef Py_SETOBJECT_H
4#define Py_SETOBJECT_H
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9
10/*
11There are three kinds of slots in the table:
12
131. Unused: key == NULL
142. Active: key != NULL and key != dummy
153. Dummy: key == dummy
16
17Note: .pop() abuses the hash field of an Unused or Dummy slot to
18hold a search finger. The hash field of Unused or Dummy slots has
19no meaning otherwise.
20*/
21
22#define PySet_MINSIZE 8
23
24typedef struct {
25 long hash; /* cached hash code for the entry key */
26 PyObject *key;
27} setentry;
28
29