/* Insert an integer in the intset */
intset *intsetAdd(intset *is, int64_t value, uint8_t *success) {
uint8_t valenc = _intsetValueEncoding(value);
- uint32_t pos, offset;
+ uint32_t pos;
if (success) *success = 1;
/* Upgrade encoding if necessary. If we need to upgrade, we know that
}
/* 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;
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 <sys/time.h>