X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/740eee1cc6fb65a094e5f17e85aa37fdaa24f2e9..aff255c81df8bd27ff53a21dd7ece5595f2ed8a9:/src/intset.c diff --git a/src/intset.c b/src/intset.c index 2f359b7f..13bd220e 100644 --- a/src/intset.c +++ b/src/intset.c @@ -179,7 +179,7 @@ intset *intsetAdd(intset *is, int64_t value, uint8_t *success) { } /* Delete integer from intset */ -intset *intsetRemove(intset *is, int64_t value, uint8_t *success) { +intset *intsetRemove(intset *is, int64_t value, int *success) { uint8_t valenc = _intsetValueEncoding(value); uint32_t pos; if (success) *success = 0; @@ -222,6 +222,11 @@ uint32_t intsetLen(intset *is) { return is->length; } +/* Return intset blob size in bytes. */ +size_t intsetBlobLen(intset *is) { + return sizeof(intset)+is->length*is->encoding; +} + #ifdef INTSET_TEST_MAIN #include