src/cx/array_list.h

Mon, 15 Dec 2025 19:00:51 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 15 Dec 2025 19:00:51 +0100
changeset 1608
46d8a8305948
parent 1607
0ecb13118cac
permissions
-rw-r--r--

complete refactoring of low-level array list functions - relates to #619

now only the documentation needs to be updated

606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 /*
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 *
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 * Copyright 2021 Mike Becker, Olaf Wintermann All rights reserved.
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 *
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 *
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 *
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 *
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 */
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 /**
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
29 * @file array_list.h
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
30 * @brief Array list implementation.
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
31 * @author Mike Becker
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
32 * @author Olaf Wintermann
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
33 * @copyright 2-Clause BSD License
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 */
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 #ifndef UCX_ARRAY_LIST_H
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 #define UCX_ARRAY_LIST_H
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39
617
cec11387c1be fix include in array_list.h
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 612
diff changeset
40 #include "list.h"
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 #ifdef __cplusplus
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 extern "C" {
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 #endif
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 /**
1424
563033aa998c fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents: 1423
diff changeset
47 * The maximum item size in an array list that fits into
563033aa998c fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents: 1423
diff changeset
48 * a stack buffer when swapped.
804
5136f2fc32ec add CX_DISABLE_ARRAY_LIST_SWAP_SBO flag
Mike Becker <universe@uap-core.de>
parents: 795
diff changeset
49 */
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
50 CX_EXPORT extern const unsigned cx_array_swap_sbo_size;
804
5136f2fc32ec add CX_DISABLE_ARRAY_LIST_SWAP_SBO flag
Mike Becker <universe@uap-core.de>
parents: 795
diff changeset
51
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
52 #define CX_ARRAY(type, name) \
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
53 struct { \
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
54 type *data; \
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
55 size_t size; \
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
56 size_t capacity; \
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
57 } name
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
58
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
59 typedef struct cx_array_s {
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
60 void *data;
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
61 size_t size;
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
62 size_t capacity;
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
63 } CxArray;
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
64
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
65 cx_attr_nonnull
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
66 CX_EXPORT int cx_array_init_(const CxAllocator *allocator, CxArray *array, size_t elem_size, size_t capacity);
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
67
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
68 #define cx_array_init_a(allocator, array, capacity) cx_array_init_(allocator, (CxArray*)&(array), sizeof((array).data[0]), capacity)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
69
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
70 #define cx_array_init(array, capacity) cx_array_init_a(cxDefaultAllocator, array, capacity)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
71
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
72 cx_attr_nonnull
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
73 CX_EXPORT void cx_array_init_fixed_(CxArray *array, const void *data, size_t capacity, size_t size);
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
74
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
75 #define cx_array_init_fixed(array, fixed_size_array, num_initialized) cx_array_init_fixed_((CxArray*)&(array), fixed_size_array, cx_nmemb(fixed_size_array), num_initialized)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
76
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
77 cx_attr_nonnull
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
78 CX_EXPORT int cx_array_reserve_(const CxAllocator *allocator, CxArray *array, size_t elem_size, size_t capacity);
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
79
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
80 #define cx_array_reserve_a(allocator, array, capacity) cx_array_reserve_(allocator, (CxArray*)&(array), sizeof((array).data[0]), capacity)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
81
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
82 #define cx_array_reserve(array, capacity) cx_array_reserve_a(cxDefaultAllocator, array, capacity)
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
83
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
84 cx_attr_nonnull
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
85 CX_EXPORT int cx_array_move_to_new_(const CxAllocator *allocator, CxArray *array, size_t elem_size, size_t capacity);
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
86
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
87 #define cx_array_move_to_new_a(allocator, array, capacity) cx_array_move_to_new_(allocator, (CxArray*)&(array), sizeof((array).data[0]), capacity)
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
88
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
89 #define cx_array_move_to_new(array, capacity) cx_array_move_to_new_a(cxDefaultAllocator, array, capacity)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
90
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
91 cx_attr_nonnull_arg(1, 2)
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
92 CX_EXPORT int cx_array_insert_(const CxAllocator *allocator, CxArray *array,
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
93 size_t elem_size, size_t index, const void *other, size_t n);
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
94
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
95 #define cx_array_add_a(allocator, array, element) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
96 cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), (array).size, element, 1)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
97
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
98 #define cx_array_add(array, element) cx_array_add_a(cxDefaultAllocator, array, element)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
99
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
100 #define cx_array_insert_a(allocator, array, index, element) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
101 cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), index, element, 1)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
102
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
103 #define cx_array_insert(array, index, element) cx_array_insert_a(cxDefaultAllocator, array, index, element)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
104
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
105 #define cx_array_insert_array_a(allocator, array, index, other, n) \
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
106 cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), index, other, n)
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
107
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
108 #define cx_array_insert_array(array, index, other, n) cx_array_insert_array_a(cxDefaultAllocator, array, index, other, n)
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
109
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
110 #define cx_array_add_array_a(allocator, array, other, n) \
1608
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
111 cx_array_insert_(allocator, (CxArray*)&(array), sizeof((array).data[0]), (array).size, other, n)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
112
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
113 #define cx_array_add_array(array, other, n) cx_array_add_array_a(cxDefaultAllocator, array, other, n)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
114
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
115 cx_attr_nonnull
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
116 CX_EXPORT int cx_array_insert_sorted_(const CxAllocator *allocator, CxArray *array,
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
117 size_t elem_size, cx_compare_func cmp_func, const void *sorted_data, size_t n,
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
118 bool allow_duplicates);
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
119
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
120 #define cx_array_insert_sorted_a(allocator, array, cmp_func, element) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
121 cx_array_insert_sorted_(allocator, (CxArray*)&(array), sizeof((array).data[0]), cmp_func, element, 1, true)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
122
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
123 #define cx_array_insert_sorted(array, cmp_func, element) cx_array_insert_sorted_a(cxDefaultAllocator, array, cmp_func, element)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
124
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
125 #define cx_array_insert_sorted_array_a(allocator, array, cmp_func, sorted_data, n) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
126 cx_array_insert_sorted_(allocator, (CxArray*)&(array), sizeof((array).data[0]), cmp_func, sorted_data, n, true)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
127
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
128 #define cx_array_insert_sorted_array(array, cmp_func, sorted_data, n) cx_array_insert_sorted_array_a(cxDefaultAllocator, array, cmp_func, sorted_data, n)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
129
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
130 #define cx_array_insert_unique_a(allocator, array, cmp_func, element) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
131 cx_array_insert_sorted_(allocator, (CxArray*)&(array), sizeof((array).data[0]), cmp_func, element, 1, false)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
132
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
133 #define cx_array_insert_unique(array, cmp_func, element) cx_array_insert_unique_a(cxDefaultAllocator, array, cmp_func, element)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
134
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
135 #define cx_array_insert_unique_array_a(allocator, array, cmp_func, sorted_data, n) \
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
136 cx_array_insert_sorted_(allocator, (CxArray*)&(array), sizeof((array).data[0]), cmp_func, sorted_data, n, false)
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
137
46d8a8305948 complete refactoring of low-level array list functions - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1607
diff changeset
138 #define cx_array_insert_unique_array(array, cmp_func, sorted_data, n) cx_array_insert_unique_array_a(cxDefaultAllocator, array, cmp_func, sorted_data, n)
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
139
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
140 cx_attr_nodiscard cx_attr_nonnull
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
141 CX_EXPORT CxIterator cx_array_iterator_(CxArray *array, size_t elem_size);
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
142
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
143 #define cx_array_iterator(array) cx_array_iterator_((CxArray*)&(array), sizeof((array).data[0]))
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
144
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
145 cx_attr_nodiscard cx_attr_nonnull
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
146 CX_EXPORT CxIterator cx_array_iterator_ptr_(CxArray *array);
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
147
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
148 #define cx_array_iterator_ptr(array) cx_array_iterator_ptr_((CxArray*)&(array))
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
149
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
150 cx_attr_nonnull
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
151 CX_EXPORT void cx_array_free_(const CxAllocator *allocator, CxArray *array);
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
152
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
153 #define cx_array_free(array) cx_array_free_(cxDefaultAllocator, (CxArray*)&(array))
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
154
1607
0ecb13118cac next step of simplifying the array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1606
diff changeset
155 #define cx_array_free_a(allocator, array) cx_array_free_(allocator, (CxArray*)&(array))
1606
f5883f6e42e7 first draft for simplifying the low-level array API - relates to #619
Mike Becker <universe@uap-core.de>
parents: 1605
diff changeset
156
998
bb196054f3fd make cx_array_copy() support different types for size/capacity - fixes #492
Mike Becker <universe@uap-core.de>
parents: 993
diff changeset
157
1419
e46406fd1b3c add functions to insert elements into lists/arrays without duplicates - resolves #557
Mike Becker <universe@uap-core.de>
parents: 1322
diff changeset
158
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
159 /**
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
160 * Searches the largest lower bound in a sorted array.
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
161 *
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
162 * In other words, this function returns the index of the largest element
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
163 * in @p arr that is less or equal to @p elem with respect to @p cmp_func.
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
164 * When no such element exists, @p size is returned.
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
165 *
1507
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
166 * When such an element exists more than once, the largest index of all those
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
167 * elements is returned.
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
168 *
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
169 * If @p elem is contained in the array, this is identical to
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
170 * #cx_array_binary_search().
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
171 *
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
172 * If the array is not sorted with respect to the @p cmp_func, the behavior
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
173 * is undefined.
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
174 *
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
175 * @param arr the array to search
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
176 * @param size the size of the array
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
177 * @param elem_size the size of one element
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
178 * @param elem the element to find
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
179 * @param cmp_func the compare function
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
180 * @return the index of the largest lower bound, or @p size
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
181 * @see cx_array_binary_search_sup()
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
182 * @see cx_array_binary_search()
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
183 */
985
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
184 cx_attr_nonnull
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
185 CX_EXPORT size_t cx_array_binary_search_inf(const void *arr, size_t size,
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
186 size_t elem_size, const void *elem, cx_compare_func cmp_func);
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
187
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
188 /**
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
189 * Searches an item in a sorted array.
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
190 *
1507
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
191 * When such an element exists more than once, the largest index of all those
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
192 * elements is returned.
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
193 *
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
194 * If the array is not sorted with respect to the @p cmp_func, the behavior
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
195 * is undefined.
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
196 *
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
197 * @param arr the array to search
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
198 * @param size the size of the array
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
199 * @param elem_size the size of one element
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
200 * @param elem the element to find
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
201 * @param cmp_func the compare function
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
202 * @return the index of the element in the array, or @p size if the element
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
203 * cannot be found
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
204 * @see cx_array_binary_search_inf()
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
205 * @see cx_array_binary_search_sup()
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
206 */
985
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
207 cx_attr_nonnull
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
208 CX_EXPORT size_t cx_array_binary_search(const void *arr, size_t size,
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
209 size_t elem_size, const void *elem, cx_compare_func cmp_func);
884
d375d8056262 add cx_array_binary_search() - fixes #424
Mike Becker <universe@uap-core.de>
parents: 883
diff changeset
210
831
7970eac1c598 add convenience macros for cx_array_*
Mike Becker <universe@uap-core.de>
parents: 819
diff changeset
211 /**
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
212 * Searches the smallest upper bound in a sorted array.
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
213 *
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
214 * In other words, this function returns the index of the smallest element
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
215 * in @p arr that is greater or equal to @p elem with respect to @p cmp_func.
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
216 * When no such element exists, @p size is returned.
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
217 *
1507
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
218 * When such an element exists more than once, the smallest index of all those
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
219 * elements is returned.
f4010cda9a2a stable return value for binary search when there are duplicates in the array
Mike Becker <universe@uap-core.de>
parents: 1482
diff changeset
220 *
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
221 * If @p elem is contained in the array, this is identical to
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
222 * #cx_array_binary_search().
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
223 *
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
224 * If the array is not sorted with respect to the @p cmp_func, the behavior
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
225 * is undefined.
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
226 *
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
227 * @param arr the array to search
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
228 * @param size the size of the array
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
229 * @param elem_size the size of one element
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
230 * @param elem the element to find
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
231 * @param cmp_func the compare function
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
232 * @return the index of the smallest upper bound, or @p size
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
233 * @see cx_array_binary_search_inf()
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
234 * @see cx_array_binary_search()
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
235 */
985
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
236 cx_attr_nonnull
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
237 CX_EXPORT size_t cx_array_binary_search_sup(const void *arr, size_t size,
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
238 size_t elem_size, const void *elem, cx_compare_func cmp_func);
886
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
239
5f5514bb104b also add a binary search for the supremum
Mike Becker <universe@uap-core.de>
parents: 885
diff changeset
240 /**
623
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
241 * Swaps two array elements.
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
242 *
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
243 * @param arr the array
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
244 * @param elem_size the element size
1424
563033aa998c fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents: 1423
diff changeset
245 * @param idx1 index of the first element
563033aa998c fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents: 1423
diff changeset
246 * @param idx2 index of the second element
623
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
247 */
985
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
248 cx_attr_nonnull
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
249 CX_EXPORT void cx_array_swap(void *arr, size_t elem_size, size_t idx1, size_t idx2);
623
21082350a590 #219 array list: implement reverse
Mike Becker <universe@uap-core.de>
parents: 617
diff changeset
250
608
2e93521145ac proposal for a low level array copy
Mike Becker <universe@uap-core.de>
parents: 606
diff changeset
251 /**
1089
865c84fef6b4 refine docs for array_list.h - issue #548
Mike Becker <universe@uap-core.de>
parents: 1084
diff changeset
252 * Allocates an array list for storing elements with @p elem_size bytes each.
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
253 *
1111
78eeeb950883 remove API for changing the store_pointer property after list creation
Mike Becker <universe@uap-core.de>
parents: 1089
diff changeset
254 * If @p elem_size is #CX_STORE_POINTERS, the created list stores pointers instead of
1424
563033aa998c fixes tons of typos and grammar issues across the documentation - fixes #667
Mike Becker <universe@uap-core.de>
parents: 1423
diff changeset
255 * copies of the added elements, and the compare function will be automatically set
1605
55b13f583356 refactor the list and map construction functions and remove the simple macros
Mike Becker <universe@uap-core.de>
parents: 1507
diff changeset
256 * to cx_cmp_ptr().
669
dce9b8450656 add docs for CX_STORE_POINTERS and remove cxHashMapCreateForPointers()
Mike Becker <universe@uap-core.de>
parents: 662
diff changeset
257 *
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258 * @param allocator the allocator for allocating the list memory
1318
12fa1d37fe48 allow changing the cxDefaultAllocator - resolves #669
Mike Becker <universe@uap-core.de>
parents: 1239
diff changeset
259 * (if @c NULL, the cxDefaultAllocator will be used)
855
35bcb3216c0d fix inconsistent use of item_size and elem_size
Mike Becker <universe@uap-core.de>
parents: 844
diff changeset
260 * @param elem_size the size of each element in bytes
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 * @param initial_capacity the initial number of elements the array can store
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 * @return the created list
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 */
985
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
264 cx_attr_nodiscard
68754c7de906 major refactoring of attributes
Mike Becker <universe@uap-core.de>
parents: 953
diff changeset
265 cx_attr_malloc
993
b642eca4b956 make names of destroy and free functions consistent - fixes #484
Mike Becker <universe@uap-core.de>
parents: 989
diff changeset
266 cx_attr_dealloc(cxListFree, 1)
1426
3a89b31f0724 clean up header files and adds support for comparing arbitrary strings with string.h functions
Mike Becker <universe@uap-core.de>
parents: 1425
diff changeset
267 CX_EXPORT CxList *cxArrayListCreate(const CxAllocator *allocator,
1605
55b13f583356 refactor the list and map construction functions and remove the simple macros
Mike Becker <universe@uap-core.de>
parents: 1507
diff changeset
268 size_t elem_size, size_t initial_capacity);
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 #ifdef __cplusplus
628
1e2be40f0cb5 use //-style single line comments everywhere
Mike Becker <universe@uap-core.de>
parents: 623
diff changeset
271 } // extern "C"
606
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 #endif
314e9288af2f add array list tests
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273
628
1e2be40f0cb5 use //-style single line comments everywhere
Mike Becker <universe@uap-core.de>
parents: 623
diff changeset
274 #endif // UCX_ARRAY_LIST_H

mercurial