source:
trunk/essentials/dev-lang/python/Include/setobject.h@
3404
| Last change on this file since 3404 was 3225, checked in by , 19 years ago | |
|---|---|
| File size: 2.6 KB | |
| Line | |
|---|---|
| 1 | /* Set object interface */ |
| 2 | |
| 3 | #ifndef Py_SETOBJECT_H |
| 4 | #define Py_SETOBJECT_H |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | |
| 10 | /* |
| 11 | There are three kinds of slots in the table: |
| 12 | |
| 13 | 1. Unused: key == NULL |
| 14 | 2. Active: key != NULL and key != dummy |
| 15 | 3. Dummy: key == dummy |
| 16 | |
| 17 | Note: .pop() abuses the hash field of an Unused or Dummy slot to |
| 18 | hold a search finger. The hash field of Unused or Dummy slots has |
| 19 | no meaning otherwise. |
| 20 | */ |
| 21 | |
| 22 | #define PySet_MINSIZE 8 |
| 23 | |
| 24 | typedef struct { |
| 25 | long hash; /* cached hash code for the entry key */ |
| 26 | PyObject *key; |
| 27 | } setentry; |
| 28 | |
| 29 | |
