* @brief Internal implementation of array_reverse. * * Reverses a block of memory in place. */
| 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 | */ |
| 170 | static 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 |
nothing calls this directly
no outgoing calls
no test coverage detected