From 8b702da397819a83a952346ddfb1929db02808bd Mon Sep 17 00:00:00 2001 From: Will Manning Date: Mon, 22 Jan 2024 13:16:42 -0500 Subject: [PATCH] bitset iterate --- src/roaring.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/roaring.zig b/src/roaring.zig index 4a6918d..9b44432 100644 --- a/src/roaring.zig +++ b/src/roaring.zig @@ -192,6 +192,10 @@ pub const Bitset = extern struct { pub fn maximum(self: *const Bitset) usize { return c.bitset_maximum(conv(self)); } + + pub fn iterate(self: *const Bitset, iter: c.bitset_iterator, arg: ?*anyopaque) bool { + return c.bitset_for_each(conv(self), iter, arg); + } }; /// This struct reimplements CRoaring's roaring_bitmap_t type