docs/Writerside/topics/list.h.md

changeset 1318
12fa1d37fe48
parent 1316
c41538edfcef
equal deleted inserted replaced
1317:eeb2fc3850e2 1318:12fa1d37fe48
24 size_t initial_capacity); 24 size_t initial_capacity);
25 ``` 25 ```
26 26
27 The function `cxLinkedListCreate()` creates a new linked list with the specified `allocator` which stores elements of size `elem_size`. 27 The function `cxLinkedListCreate()` creates a new linked list with the specified `allocator` which stores elements of size `elem_size`.
28 The elements are supposed to be compared with the specified `comparator` (cf. [](#access-and-find)). 28 The elements are supposed to be compared with the specified `comparator` (cf. [](#access-and-find)).
29 The function `cxLinkedListCreateSimple()` will use the stdlib default allocator and does not specify a compare function. 29 The function `cxLinkedListCreateSimple()` will use the [default allocator](allocator.h.md#default-allocator) and does not specify a compare function.
30 30
31 Array lists can be created with `cxArrayListCreate()` where the additional argument `initial_capacity` specifies for how many elements the underlying array shall be initially allocated. 31 Array lists can be created with `cxArrayListCreate()` where the additional argument `initial_capacity` specifies for how many elements the underlying array shall be initially allocated.
32 32
33 If `CX_STORE_POINTERS` is used as `elem_size`, the actual element size will be `sizeof(void*)` and the list will behave slightly differently when accessing elements. 33 If `CX_STORE_POINTERS` is used as `elem_size`, the actual element size will be `sizeof(void*)` and the list will behave slightly differently when accessing elements.
34 Lists that are storing pointers will always return the stored pointer directly, instead of returning a pointer into the list's memory, thus saving you from unnecessary dereferencing. 34 Lists that are storing pointers will always return the stored pointer directly, instead of returning a pointer into the list's memory, thus saving you from unnecessary dereferencing.

mercurial