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

Function __array_reverse_impl

array/array.h:160–171  ·  view source on GitHub ↗

* @brief Internal implementation of array_reverse. * * Reverses a block of memory in place. */

Source from the content-addressed store, hash-verified

158
159/**
160 * @brief Clears the array by zeroing its memory.
161 */
162#define array_clear(arr) memset((arr).data, 0, sizeof((arr).data))
163
164
165/**
166 * @brief Internal implementation of array_reverse.
167 *
168 * Reverses a block of memory in place.
169 */
170static inline void arrayp_reverse_impl(void *data, size_t count, size_t elem_size) {
171 unsigned char *ptr = (unsigned char*)data;
172 for (size_t i = 0; i < count / 2; i++) {
173 size_t j = count - 1 - i;
174

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected