Lines Matching refs:array1
58 # define ARRAY_TYPES_CHECK(array1, array2) \
60 **(array1)->v_modifiable, **(array2)->v_modifiable)
66 # define ARRAY_TYPES_CHECK(array1, array2) 0
305 array_swap_i(struct array *array1, struct array *array2)
307 buffer_t *buffer = array1->buffer;
308 size_t elsize = array1->element_size;
310 array1->buffer = array2->buffer;
311 array1->element_size = array2->element_size;
315 #define array_swap(array1, array2) \
316 array_swap_i(&(array1)->arr + ARRAY_TYPES_CHECK(array1, array2), \
319 bool array_cmp_i(const struct array *array1,
321 #define array_cmp(array1, array2) \
322 array_cmp_i(&(array1)->arr, &(array2)->arr)
325 bool array_equal_fn_i(const struct array *array1,
328 #define array_equal_fn(array1, array2, cmp) \
329 array_equal_fn_i(&(array1)->arr + \
330 ARRAY_TYPES_CHECK(array1, array2), \
332 CALLBACK_TYPECHECK(cmp, int (*)(typeof(*(array1)->v), \
335 bool array_equal_fn_ctx_i(const struct array *array1,
343 #define array_equal_fn_ctx(array1, array2, cmp, ctx) \
344 array_equal_fn_ctx_i(&(array1)->arr + \
345 ARRAY_TYPES_CHECK(array1, array2), \
347 CALLBACK_TYPECHECK(cmp, int (*)(typeof(*(array1)->v), \