]>
Commit | Line | Data |
---|---|---|
144b0094 PN |
1 | #ifndef __INTSET_H |
2 | #define __INTSET_H | |
e24d9376 | 3 | #include <stdint.h> |
144b0094 PN |
4 | |
5 | typedef struct intset { | |
6 | uint32_t encoding; | |
7 | uint32_t length; | |
8 | int8_t contents[]; | |
9 | } intset; | |
10 | ||
11 | intset *intsetNew(void); | |
12 | intset *intsetAdd(intset *is, int64_t value, uint8_t *success); | |
a5be65f7 | 13 | intset *intsetRemove(intset *is, int64_t value, int *success); |
144b0094 PN |
14 | uint8_t intsetFind(intset *is, int64_t value); |
15 | int64_t intsetRandom(intset *is); | |
d0b58d53 PN |
16 | uint8_t intsetGet(intset *is, uint32_t pos, int64_t *value); |
17 | uint32_t intsetLen(intset *is); | |
d4fb9f41 | 18 | size_t intsetBlobLen(intset *is); |
144b0094 PN |
19 | |
20 | #endif // __INTSET_H |