Lines Matching refs:element_size
115 size_t element_size)
118 array->element_size = element_size;
120 #define array_create_from_buffer(array, buffer, element_size) \
121 array_create_from_buffer_i(&(array)->arr, buffer, element_size)
125 size_t element_size, unsigned int init_count)
129 buffer = buffer_create_dynamic(pool, init_count * element_size);
130 array_create_from_buffer_i(array, buffer, element_size);
132 #define array_create(array, pool, element_size, init_count) \
133 array_create_i(&(array)->arr, pool, element_size, init_count)
170 return array->buffer->used / array->element_size;
183 buffer_append(array->buffer, data, count * array->element_size);
193 i_assert(dest_array->element_size == src_array->element_size);
204 buffer_insert(array->buffer, idx * array->element_size,
205 data, count * array->element_size);
215 buffer_delete(array->buffer, idx * array->element_size,
216 count * array->element_size);
234 i_assert(idx * array->element_size < array->buffer->used);
235 return CONST_PTR_OFFSET(array->buffer->data, idx * array->element_size);
275 data = buffer_append_space_unsafe(array->buffer, array->element_size);
276 memset(data, 0, array->element_size);
293 i_assert(dest->element_size == src->element_size);
295 buffer_copy(dest->buffer, dest_idx * dest->element_size,
296 src->buffer, src_idx * src->element_size,
297 count * dest->element_size);
303 have .element_size == 0). */
308 size_t elsize = array1->element_size;
311 array1->element_size = array2->element_size;
313 array2->element_size = elsize;