Commit 68495c46 authored by antirez's avatar antirez
Browse files

changed names of APIs to get blob len of special encoded data types

parent 3dffb8e2
......@@ -222,8 +222,8 @@ uint32_t intsetLen(intset *is) {
return is->length;
}
/* Return intset size in bytes. */
size_t intsetSize(intset *is) {
/* Return intset blob size in bytes. */
size_t intsetBlobLen(intset *is) {
return sizeof(intset)+is->length*is->encoding;
}
......
......@@ -15,6 +15,6 @@ uint8_t intsetFind(intset *is, int64_t value);
int64_t intsetRandom(intset *is);
uint8_t intsetGet(intset *is, uint32_t pos, int64_t *value);
uint32_t intsetLen(intset *is);
size_t intsetSize(intset *is);
size_t intsetBlobLen(intset *is);
#endif // __INTSET_H
......@@ -732,8 +732,8 @@ unsigned int ziplistLen(unsigned char *zl) {
return len;
}
/* Return ziplist size in bytes. */
size_t ziplistSize(unsigned char *zl) {
/* Return ziplist blob size in bytes. */
size_t ziplistBlobLen(unsigned char *zl) {
return ZIPLIST_BYTES(zl);
}
......
......@@ -12,4 +12,4 @@ unsigned char *ziplistDelete(unsigned char *zl, unsigned char **p);
unsigned char *ziplistDeleteRange(unsigned char *zl, unsigned int index, unsigned int num);
unsigned int ziplistCompare(unsigned char *p, unsigned char *s, unsigned int slen);
unsigned int ziplistLen(unsigned char *zl);
size_t ziplistSize(unsigned char *zl);
size_t ziplistBlobLen(unsigned char *zl);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment