src/cx/array_list.h

changeset 609
6ae8146d9f62
parent 608
2e93521145ac
child 610
de5d3ee6435f
equal deleted inserted replaced
608:2e93521145ac 609:6ae8146d9f62
58 * track of the state of the memory or other additional allocator info. 58 * track of the state of the memory or other additional allocator info.
59 * 59 *
60 * @param array the array to reallocate 60 * @param array the array to reallocate
61 * @param capacity the new capacity (number of elements) 61 * @param capacity the new capacity (number of elements)
62 * @param elem_size the size of each element 62 * @param elem_size the size of each element
63 * @param data additional data 63 * @param alloc a reference to this allocator
64 * @return a pointer to the reallocated memory or \c NULL on failure 64 * @return a pointer to the reallocated memory or \c NULL on failure
65 */ 65 */
66 void *(*realloc)( 66 void *(*realloc)(
67 void *array, 67 void *array,
68 size_t capacity, 68 size_t capacity,
69 size_t elem_size, 69 size_t elem_size,
70 void *data 70 struct cx_array_reallocator_s *alloc
71 ); 71 );
72 72
73 /** 73 /**
74 * Additional data. 74 * Custom data pointer.
75 */ 75 */
76 void *data; 76 void *ptr1;
77 /**
78 * Custom data pointer.
79 */
80 void *ptr2;
81 /**
82 * Custom data integer.
83 */
84 size_t int1;
85 /**
86 * Custom data integer.
87 */
88 size_t int2;
77 }; 89 };
78 90
79 /** 91 /**
80 * Copies elements from one array to another. 92 * Copies elements from one array to another.
81 * 93 *

mercurial