Skip to content

Commit cd2152f

Browse files
committed
Version v4.2.3
1 parent ff13598 commit cd2152f

File tree

3 files changed

+34
-36
lines changed

3 files changed

+34
-36
lines changed

pyroaring/croaring_version.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__croaring_version__ = "v4.2.0"
1+
__croaring_version__ = "v4.2.3"

pyroaring/roaring.c

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2-
// Created by amalgamation.sh on 2024-09-30T21:45:33Z
2+
// Created by amalgamation.sh on 2025-02-26T22:28:04Z
33

44
/*
55
* The CRoaring project is under a dual license (Apache/MIT).
@@ -10418,7 +10418,7 @@ static art_val_t *art_find_at(const art_node_t *node,
1041810418
}
1041910419

1042010420
// Returns the size in bytes of the subtrie.
10421-
size_t art_size_in_bytes_at(const art_node_t *node) {
10421+
static size_t art_size_in_bytes_at(const art_node_t *node) {
1042210422
if (art_is_leaf(node)) {
1042310423
return 0;
1042410424
}
@@ -10472,7 +10472,7 @@ static void art_node_print_type(const art_node_t *node) {
1047210472
}
1047310473
}
1047410474

10475-
void art_node_printf(const art_node_t *node, uint8_t depth) {
10475+
static void art_node_printf(const art_node_t *node, uint8_t depth) {
1047610476
if (art_is_leaf(node)) {
1047710477
printf("{ type: Leaf, key: ");
1047810478
art_leaf_t *leaf = CROARING_CAST_LEAF(node);
@@ -14106,7 +14106,7 @@ int bitset_container_##opname##_nocard(const bitset_container_t *src_1, \
1410614106
} \
1410714107
int bitset_container_##opname##_justcard(const bitset_container_t *src_1, \
1410814108
const bitset_container_t *src_2) { \
14109-
printf("A1\n"); const uint64_t * __restrict__ words_1 = src_1->words; \
14109+
const uint64_t * __restrict__ words_1 = src_1->words; \
1411014110
const uint64_t * __restrict__ words_2 = src_2->words; \
1411114111
int32_t sum = 0; \
1411214112
for (size_t i = 0; i < BITSET_CONTAINER_SIZE_IN_WORDS; i += 2) { \
@@ -22982,19 +22982,6 @@ roaring64_bitmap_t *roaring64_bitmap_of_ptr(size_t n_args,
2298222982
return r;
2298322983
}
2298422984

22985-
roaring64_bitmap_t *roaring64_bitmap_of(size_t n_args, ...) {
22986-
roaring64_bitmap_t *r = roaring64_bitmap_create();
22987-
roaring64_bulk_context_t context = CROARING_ZERO_INITIALIZER;
22988-
va_list ap;
22989-
va_start(ap, n_args);
22990-
for (size_t i = 0; i < n_args; i++) {
22991-
uint64_t val = va_arg(ap, uint64_t);
22992-
roaring64_bitmap_add_bulk(r, &context, val);
22993-
}
22994-
va_end(ap);
22995-
return r;
22996-
}
22997-
2299822985
static inline leaf_t *containerptr_roaring64_bitmap_add(roaring64_bitmap_t *r,
2299922986
uint8_t *high48,
2300022987
uint16_t low16,

pyroaring/roaring.h

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2-
// Created by amalgamation.sh on 2024-09-30T21:45:33Z
2+
// Created by amalgamation.sh on 2025-02-26T22:28:04Z
33

44
/*
55
* The CRoaring project is under a dual license (Apache/MIT).
@@ -59,11 +59,11 @@
5959
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
6060
#ifndef ROARING_INCLUDE_ROARING_VERSION
6161
#define ROARING_INCLUDE_ROARING_VERSION
62-
#define ROARING_VERSION "4.2.0"
62+
#define ROARING_VERSION "4.2.3"
6363
enum {
6464
ROARING_VERSION_MAJOR = 4,
6565
ROARING_VERSION_MINOR = 2,
66-
ROARING_VERSION_REVISION = 0
66+
ROARING_VERSION_REVISION = 3
6767
};
6868
#endif // ROARING_INCLUDE_ROARING_VERSION
6969
// clang-format on/* end file include/roaring/roaring_version.h */
@@ -86,9 +86,10 @@ enum {
8686
#ifndef CROARING_INCLUDE_PORTABILITY_H_
8787
#define CROARING_INCLUDE_PORTABILITY_H_
8888

89-
#ifndef _GNU_SOURCE
90-
#define _GNU_SOURCE 1
91-
#endif // _GNU_SOURCE
89+
// Users who need _GNU_SOURCE should define it?
90+
// #ifndef _GNU_SOURCE
91+
// #define _GNU_SOURCE 1
92+
// #endif // _GNU_SOURCE
9293
#ifndef __STDC_FORMAT_MACROS
9394
#define __STDC_FORMAT_MACROS 1
9495
#endif // __STDC_FORMAT_MACROS
@@ -125,12 +126,11 @@ enum {
125126
#ifndef _POSIX_C_SOURCE
126127
#define _POSIX_C_SOURCE 200809L
127128
#endif // !(defined(_POSIX_C_SOURCE)) || (_POSIX_C_SOURCE < 200809L)
128-
#if !(defined(_XOPEN_SOURCE)) || (_XOPEN_SOURCE < 700)
129-
#define _XOPEN_SOURCE 700
130-
#endif // !(defined(_XOPEN_SOURCE)) || (_XOPEN_SOURCE < 700)
131129

132130
#ifdef __illumos__
131+
#ifndef __EXTENSIONS__
133132
#define __EXTENSIONS__
133+
#endif // __EXTENSIONS__
134134
#endif
135135

136136
#include <stdbool.h>
@@ -1072,7 +1072,8 @@ inline size_t bitset_next_set_bits(const bitset_t *bitset, size_t *buffer,
10721072
return 0; // nothing more to iterate over
10731073
}
10741074
uint64_t w = bitset->array[x];
1075-
w >>= (*startfrom & 63);
1075+
// unset low bits inside the word less than *startfrom
1076+
w &= ~((UINT64_C(1) << (*startfrom & 63)) - 1);
10761077
size_t howmany = 0;
10771078
size_t base = x << 6;
10781079
while (howmany < capacity) {
@@ -1779,11 +1780,14 @@ roaring_bitmap_t *roaring_bitmap_portable_deserialize(const char *buf);
17791780
* order. This is is guaranteed to happen when serializing an existing bitmap,
17801781
* but not for random inputs.
17811782
*
1782-
* You may use roaring_bitmap_internal_validate to check the validity of the
1783-
* bitmap prior to using it.
1783+
* If the source is untrusted, you should call
1784+
* roaring_bitmap_internal_validate to check the validity of the
1785+
* bitmap prior to using it. Only after calling roaring_bitmap_internal_validate
1786+
* is the bitmap considered safe for use.
17841787
*
1785-
* We recommend that you use checksums to check that serialized data corresponds
1786-
* to a serialized bitmap.
1788+
* We also recommend that you use checksums to check that serialized data
1789+
* corresponds to the serialized bitmap. The CRoaring library does not provide
1790+
* checksumming.
17871791
*
17881792
* This function is endian-sensitive. If you have a big-endian system (e.g., a
17891793
* mainframe IBM s390x), the data format is going to be big-endian and not
@@ -2313,6 +2317,10 @@ CROARING_DEPRECATED static inline uint32_t roaring_read_uint32_iterator(
23132317
using namespace ::roaring::api;
23142318
#endif
23152319
#endif
2320+
2321+
// roaring64 will include roaring.h, but we would
2322+
// prefer to avoid having our users include roaring64.h
2323+
// in addition to roaring.h.
23162324
/* end file include/roaring/roaring.h */
23172325
/* begin file include/roaring/memory.h */
23182326
#ifndef INCLUDE_ROARING_MEMORY_H_
@@ -2902,11 +2910,14 @@ size_t roaring64_bitmap_portable_deserialize_size(const char *buf,
29022910
* order. This is is guaranteed to happen when serializing an existing bitmap,
29032911
* but not for random inputs.
29042912
*
2905-
* You may use roaring64_bitmap_internal_validate to check the validity of the
2906-
* bitmap prior to using it.
2913+
* If the source is untrusted, you should call
2914+
* roaring64_bitmap_internal_validate to check the validity of the
2915+
* bitmap prior to using it. Only after calling
2916+
* roaring64_bitmap_internal_validate is the bitmap considered safe for use.
29072917
*
2908-
* We recommend that you use checksums to check that serialized data corresponds
2909-
* to a serialized bitmap.
2918+
* We also recommend that you use checksums to check that serialized data
2919+
* corresponds to the serialized bitmap. The CRoaring library does not provide
2920+
* checksumming.
29102921
*
29112922
* This function is endian-sensitive. If you have a big-endian system (e.g., a
29122923
* mainframe IBM s390x), the data format is going to be big-endian and not

0 commit comments

Comments
 (0)