redict/ziplist.h

17 lines
956 B
C
Raw Normal View History

#define ZIPLIST_HEAD 0
#define ZIPLIST_TAIL 1
2010-05-22 10:25:18 -04:00
unsigned char *ziplistNew(void);
2010-05-29 13:34:14 -04:00
unsigned char *ziplistPush(unsigned char *zl, char *s, unsigned int slen, int where);
2010-05-22 10:25:18 -04:00
unsigned char *ziplistPop(unsigned char *zl, sds *target, int where);
unsigned char *ziplistIndex(unsigned char *zl, int index);
unsigned char *ziplistNext(unsigned char *zl, unsigned char *p);
unsigned char *ziplistPrev(unsigned char *zl, unsigned char *p);
2010-05-29 13:34:14 -04:00
unsigned int ziplistGet(unsigned char *p, char **sstr, unsigned int *slen, long long *sval);
unsigned char *ziplistInsert(unsigned char *zl, unsigned char *p, char *s, unsigned int slen);
unsigned char *ziplistDelete(unsigned char *zl, unsigned char **p, int direction);
2010-05-22 10:25:18 -04:00
unsigned char *ziplistDeleteRange(unsigned char *zl, unsigned int index, unsigned int num);
2010-05-29 13:34:14 -04:00
unsigned int ziplistCompare(unsigned char *p, char *entry, unsigned int elen);
unsigned int ziplistLen(unsigned char *zl);
unsigned int ziplistSize(unsigned char *zl);