MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / __array_find_impl

Function __array_find_impl

array/array.h:236–245  ·  view source on GitHub ↗

* @brief Internal implementation of array_find. * * Searches the array for an element equal to the key using the * comparison function. Returns the matching element, or NULL. */

Source from the content-addressed store, hash-verified

234 memcpy(_temp, (arr1).data, sizeof((arr1).data)); \
235 memcpy((arr1).data, (arr2).data, sizeof((arr1).data)); \
236 memcpy((arr2).data, _temp, sizeof((arr1).data)); \
237 } while (0)
238
239
240/**
241 * @brief Internal implementation of array_find.
242 *
243 * Searches the array for an element equal to the key using the
244 * comparison function. Returns the matching element, or NULL.
245 */
246static inline void *arrayp_find_impl(const void *data, size_t count, size_t elem_size,
247 const void *key,
248 int (*cmp)(const void *, const void *)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected