Interface fix where MEMCPY_T parameter was forgotten in rb_pop_front

This commit is contained in:
Imbus 2024-07-02 05:42:44 +02:00
parent c4f1ede6b0
commit db38111b3c
2 changed files with 3 additions and 3 deletions

View file

@ -105,12 +105,12 @@ rb_push_many(struct RingBuf *rb, const void *items, MEMCPY_T memcpy_fn,
}
enum ReadResult
rb_pop_front(struct RingBuf *rb, void *item)
rb_pop_front(struct RingBuf *rb, void *item, MEMCPY_T memcpy_fn)
{
if(rb->count == 0)
return Empty;
memcpy(item, rb->read_head, rb->struct_size);
memcpy_fn(item, rb->read_head, rb->struct_size);
// Advance the read head
rb->read_head = (char *)rb->read_head + rb->struct_size;

View file

@ -77,7 +77,7 @@ enum WriteResult rb_push_many(struct RingBuf *rb, const void *items,
* @param item The item to read into
* @return ReadResult
*/
enum ReadResult rb_pop_front(struct RingBuf *rb, void *item);
enum ReadResult rb_pop_front(struct RingBuf *rb, void *item, MEMCPY_T memcpy_fn);
/**
* @brief Free the ring buffer