]> git.ipfire.org Git - thirdparty/git.git/blobdiff - ewah/bitmap.c
Merge branch 'sg/commit-slab-clarify-peek'
[thirdparty/git.git] / ewah / bitmap.c
index b5fed9621f425b08af27c56be0e3f88a331e314b..d8cec585af97e66e0534c1cebd32f2cdf022d382 100644 (file)
@@ -50,6 +50,14 @@ void bitmap_set(struct bitmap *self, size_t pos)
        self->words[block] |= EWAH_MASK(pos);
 }
 
+void bitmap_unset(struct bitmap *self, size_t pos)
+{
+       size_t block = EWAH_BLOCK(pos);
+
+       if (block < self->word_alloc)
+               self->words[block] &= ~EWAH_MASK(pos);
+}
+
 int bitmap_get(struct bitmap *self, size_t pos)
 {
        size_t block = EWAH_BLOCK(pos);