Sun, 13 Nov 2022 13:29:15 +0100
more custom data for array re-allocator
src/cx/array_list.h | file | annotate | diff | comparison | revisions |
1.1 --- a/src/cx/array_list.h Sun Nov 13 13:22:03 2022 +0100 1.2 +++ b/src/cx/array_list.h Sun Nov 13 13:29:15 2022 +0100 1.3 @@ -60,20 +60,32 @@ 1.4 * @param array the array to reallocate 1.5 * @param capacity the new capacity (number of elements) 1.6 * @param elem_size the size of each element 1.7 - * @param data additional data 1.8 + * @param alloc a reference to this allocator 1.9 * @return a pointer to the reallocated memory or \c NULL on failure 1.10 */ 1.11 void *(*realloc)( 1.12 void *array, 1.13 size_t capacity, 1.14 size_t elem_size, 1.15 - void *data 1.16 + struct cx_array_reallocator_s *alloc 1.17 ); 1.18 1.19 /** 1.20 - * Additional data. 1.21 + * Custom data pointer. 1.22 */ 1.23 - void *data; 1.24 + void *ptr1; 1.25 + /** 1.26 + * Custom data pointer. 1.27 + */ 1.28 + void *ptr2; 1.29 + /** 1.30 + * Custom data integer. 1.31 + */ 1.32 + size_t int1; 1.33 + /** 1.34 + * Custom data integer. 1.35 + */ 1.36 + size_t int2; 1.37 }; 1.38 1.39 /**