Permalink
Browse files

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

  • Loading branch information...
1 parent 3dffb8e commit 68495c46fe081a6a200ec7bc96e3d78924281fd1 @antirez committed Feb 28, 2011
Showing with 6 additions and 6 deletions.
  1. +2 −2 src/intset.c
  2. +1 −1 src/intset.h
  3. +2 −2 src/ziplist.c
  4. +1 −1 src/ziplist.h
View
@@ -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;
}
View
@@ -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
View
@@ -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);
}
View
@@ -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);

0 comments on commit 68495c4

Please sign in to comment.