Skip to content

Commit 8763a73

Browse files
committed
chore: update croaring to 4.4.0
1 parent f811aa4 commit 8763a73

File tree

8 files changed

+536
-277
lines changed

8 files changed

+536
-277
lines changed

Cargo.lock

Lines changed: 98 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Current documentation is available at https://docs.rs/croaring/latest/croaring/
127127

128128
## CRoaring Version
129129

130-
This crate uses [CRoaring version `4.3.10`](https://github.com/RoaringBitmap/CRoaring/releases/tag/v4.3.10).
130+
This crate uses [CRoaring version `4.4.0`](https://github.com/RoaringBitmap/CRoaring/releases/tag/v4.4.0).
131131
The version of this crate does not necessarily match the version of CRoaring: the major version of the crate is only
132132
incremented when there are breaking changes in the Rust API: It is possible (and has happened) that breaking changes
133133
in the CRoaring C API do not necessitate a major version bump in this crate.

croaring-sys/CRoaring/bindgen_bundled_version.rs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/* automatically generated by rust-bindgen 0.72.0 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

3-
pub const ROARING_VERSION: &[u8; 7] = b"4.3.10\0";
3+
pub const ROARING_VERSION: &[u8; 6] = b"4.4.0\0";
44
pub const ROARING_VERSION_MAJOR: _bindgen_ty_1 = 4;
5-
pub const ROARING_VERSION_MINOR: _bindgen_ty_1 = 3;
6-
pub const ROARING_VERSION_REVISION: _bindgen_ty_1 = 10;
5+
pub const ROARING_VERSION_MINOR: _bindgen_ty_1 = 4;
6+
pub const ROARING_VERSION_REVISION: _bindgen_ty_1 = 0;
77
pub type _bindgen_ty_1 = ::core::ffi::c_uint;
88
extern "C" {
99
#[doc = " result might be undefined when input_num is zero"]
@@ -239,6 +239,14 @@ extern "C" {
239239
#[doc = " Creates a new bitmap from a pointer of uint32_t integers\n The returned pointer may be NULL in case of errors."]
240240
pub fn roaring_bitmap_of_ptr(n_args: usize, vals: *const u32) -> *mut roaring_bitmap_t;
241241
}
242+
extern "C" {
243+
#[doc = " Check if the bitmap contains any shared containers."]
244+
pub fn roaring_contains_shared(r: *const roaring_bitmap_t) -> bool;
245+
}
246+
extern "C" {
247+
#[doc = " Unshare all shared containers.\n Returns true if any unsharing was performed, false if there were no shared\n containers."]
248+
pub fn roaring_unshare_all(r: *mut roaring_bitmap_t) -> bool;
249+
}
242250
extern "C" {
243251
pub fn roaring_bitmap_get_copy_on_write(r: *const roaring_bitmap_t) -> bool;
244252
}
@@ -515,7 +523,7 @@ extern "C" {
515523
pub fn roaring_bitmap_to_bitset(r: *const roaring_bitmap_t, bitset: *mut bitset_t) -> bool;
516524
}
517525
extern "C" {
518-
#[doc = " Convert the bitmap to a sorted array from `offset` by `limit`, output in\n `ans`.\n\n Caller is responsible to ensure that there is enough memory allocated, e.g.\n\n ans = malloc(roaring_bitmap_get_cardinality(limit) * sizeof(uint32_t));\n\n Return false in case of failure (e.g., insufficient memory)"]
526+
#[doc = " Convert the bitmap to a sorted array from `offset` by `limit`, output in\n `ans`.\n\n Caller is responsible to ensure that there is enough memory allocated, e.g.\n\n ans = malloc(roaring_bitmap_get_cardinality(limit) * sizeof(uint32_t));\n\n This function always returns `true`\n\n For more control, see `roaring_uint32_iterator_skip` and\n `roaring_uint32_iterator_read`, which can be used to e.g. tell how many\n values were actually read."]
519527
pub fn roaring_bitmap_range_uint32_array(
520528
r: *const roaring_bitmap_t,
521529
offset: usize,
@@ -801,12 +809,24 @@ extern "C" {
801809
pub fn roaring_uint32_iterator_free(it: *mut roaring_uint32_iterator_t);
802810
}
803811
extern "C" {
812+
#[doc = " Reads next ${count} values from iterator into user-supplied ${buf}.\n Returns the number of read elements.\n This number can be smaller than ${count}, which means that iterator is\n drained.\n\n This function satisfies semantics of iteration and can be used together with\n other iterator functions.\n - first value is copied from ${it}->current_value\n - after function returns, iterator is positioned at the next element"]
804813
pub fn roaring_uint32_iterator_read(
805814
it: *mut roaring_uint32_iterator_t,
806815
buf: *mut u32,
807816
count: u32,
808817
) -> u32;
809818
}
819+
extern "C" {
820+
#[doc = " Skip the next ${count} values from iterator.\n Returns the number of values actually skipped.\n The number can be smaller than ${count}, which means that iterator is\n drained.\n\n This function is equivalent to calling `roaring_uint32_iterator_advance()`\n ${count} times but is much more efficient."]
821+
pub fn roaring_uint32_iterator_skip(it: *mut roaring_uint32_iterator_t, count: u32) -> u32;
822+
}
823+
extern "C" {
824+
#[doc = " Skip the previous ${count} values from iterator (move backwards).\n Returns the number of values actually skipped backwards.\n The number can be smaller than ${count}, which means that iterator reached\n the beginning.\n\n This function is equivalent to calling `roaring_uint32_iterator_previous()`\n ${count} times but is much more efficient."]
825+
pub fn roaring_uint32_iterator_skip_backward(
826+
it: *mut roaring_uint32_iterator_t,
827+
count: u32,
828+
) -> u32;
829+
}
810830
pub type roaring_malloc_p =
811831
::core::option::Option<unsafe extern "C" fn(arg1: usize) -> *mut ::core::ffi::c_void>;
812832
pub type roaring_realloc_p = ::core::option::Option<

0 commit comments

Comments
 (0)