Skip to content

Commit 90a5a77

Browse files
authored
Merge pull request #10 from RoaringBitmap/dlemire/updating_croaring_to_0_5
Updating CRoaring to 0.5.
2 parents 99a12b9 + 432d6a0 commit 90a5a77

File tree

2 files changed

+517
-116
lines changed

2 files changed

+517
-116
lines changed

Sources/CRoaring/include/roaring.h

Lines changed: 49 additions & 12 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 Mon 16 Aug 2021 13:20:45 EDT
2+
// Created by amalgamation.sh on Wed 8 Jun 2022 15:13:10 EDT
33

44
/*
55
* Copyright 2016-2020 The CRoaring authors
@@ -23,11 +23,11 @@
2323
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
2424
#ifndef ROARING_INCLUDE_ROARING_VERSION
2525
#define ROARING_INCLUDE_ROARING_VERSION
26-
#define ROARING_VERSION = 0.3.4,
26+
#define ROARING_VERSION "0.5.0"
2727
enum {
2828
ROARING_VERSION_MAJOR = 0,
29-
ROARING_VERSION_MINOR = 3,
30-
ROARING_VERSION_REVISION = 4
29+
ROARING_VERSION_MINOR = 5,
30+
ROARING_VERSION_REVISION = 0
3131
};
3232
#endif // ROARING_INCLUDE_ROARING_VERSION
3333
/* end file include/roaring/roaring_version.h */
@@ -68,12 +68,6 @@ extern "C" { namespace roaring { namespace api {
6868
#define ROARING_CONTAINER_T void // no compile-time checking
6969
#endif
7070

71-
72-
#define MAX_CONTAINERS 65536
73-
74-
#define SERIALIZATION_ARRAY_UINT32 1
75-
#define SERIALIZATION_CONTAINER 2
76-
7771
#define ROARING_FLAG_COW UINT8_C(0x1)
7872
#define ROARING_FLAG_FROZEN UINT8_C(0x2)
7973

@@ -228,6 +222,8 @@ static inline void roaring_bitmap_set_copy_on_write(roaring_bitmap_t* r,
228222
}
229223
}
230224

225+
roaring_bitmap_t *roaring_bitmap_add_offset(const roaring_bitmap_t *bm,
226+
int64_t offset);
231227
/**
232228
* Describe the inner structure of the bitmap.
233229
*/
@@ -502,7 +498,7 @@ bool roaring_bitmap_is_empty(const roaring_bitmap_t *r);
502498
void roaring_bitmap_clear(roaring_bitmap_t *r);
503499

504500
/**
505-
* Convert the bitmap to an array, output in `ans`,
501+
* Convert the bitmap to a sorted array, output in `ans`.
506502
*
507503
* Caller is responsible to ensure that there is enough memory allocated, e.g.
508504
*
@@ -512,7 +508,7 @@ void roaring_bitmap_to_uint32_array(const roaring_bitmap_t *r, uint32_t *ans);
512508

513509

514510
/**
515-
* Convert the bitmap to an array from `offset` by `limit`, output in `ans`.
511+
* Convert the bitmap to a sorted array from `offset` by `limit`, output in `ans`.
516512
*
517513
* Caller is responsible to ensure that there is enough memory allocated, e.g.
518514
*
@@ -957,3 +953,44 @@ uint32_t roaring_read_uint32_iterator(roaring_uint32_iterator_t *it,
957953
#endif
958954

959955
/* end file include/roaring/roaring.h */
956+
/* begin file include/roaring/memory.h */
957+
#ifndef INCLUDE_ROARING_MEMORY_H_
958+
#define INCLUDE_ROARING_MEMORY_H_
959+
960+
#ifdef __cplusplus
961+
extern "C" {
962+
#endif
963+
964+
#include <stddef.h> // for size_t
965+
966+
typedef void* (*roaring_malloc_p)(size_t);
967+
typedef void* (*roaring_realloc_p)(void*, size_t);
968+
typedef void* (*roaring_calloc_p)(size_t, size_t);
969+
typedef void (*roaring_free_p)(void*);
970+
typedef void* (*roaring_aligned_malloc_p)(size_t, size_t);
971+
typedef void (*roaring_aligned_free_p)(void*);
972+
973+
typedef struct roaring_memory_s {
974+
roaring_malloc_p malloc;
975+
roaring_realloc_p realloc;
976+
roaring_calloc_p calloc;
977+
roaring_free_p free;
978+
roaring_aligned_malloc_p aligned_malloc;
979+
roaring_aligned_free_p aligned_free;
980+
} roaring_memory_t;
981+
982+
void roaring_init_memory_hook(roaring_memory_t memory_hook);
983+
984+
void* roaring_malloc(size_t);
985+
void* roaring_realloc(void*, size_t);
986+
void* roaring_calloc(size_t, size_t);
987+
void roaring_free(void*);
988+
void* roaring_aligned_malloc(size_t, size_t);
989+
void roaring_aligned_free(void*);
990+
991+
#ifdef __cplusplus
992+
}
993+
#endif
994+
995+
#endif // INCLUDE_ROARING_MEMORY_H_
996+
/* end file include/roaring/memory.h */

0 commit comments

Comments
 (0)