]> git.saurik.com Git - redis.git/blame_incremental - src/intset.h
Merge pull request #455 from pietern/2.6-mkopts
[redis.git] / src / intset.h
... / ...
CommitLineData
1#ifndef __INTSET_H
2#define __INTSET_H
3#include <stdint.h>
4
5typedef struct intset {
6 uint32_t encoding;
7 uint32_t length;
8 int8_t contents[];
9} intset;
10
11intset *intsetNew(void);
12intset *intsetAdd(intset *is, int64_t value, uint8_t *success);
13intset *intsetRemove(intset *is, int64_t value, int *success);
14uint8_t intsetFind(intset *is, int64_t value);
15int64_t intsetRandom(intset *is);
16uint8_t intsetGet(intset *is, uint32_t pos, int64_t *value);
17uint32_t intsetLen(intset *is);
18size_t intsetBlobLen(intset *is);
19
20#endif // __INTSET_H