mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[common] ringbuffer: add getLength method
This commit is contained in:
parent
c3bc5fb0ff
commit
41403286d1
@ -27,6 +27,7 @@ void ringbuffer_free(RingBuffer * rb);
|
||||
void ringbuffer_push(RingBuffer rb, const void * value);
|
||||
void ringbuffer_reset(RingBuffer rb);
|
||||
|
||||
int ringbuffer_getLength(const RingBuffer rb);
|
||||
int ringbuffer_getStart (const RingBuffer rb);
|
||||
int ringbuffer_getCount (const RingBuffer rb);
|
||||
void * ringbuffer_getValues(const RingBuffer rb);
|
||||
|
@ -69,6 +69,11 @@ void ringbuffer_reset(RingBuffer rb)
|
||||
rb->count = 0;
|
||||
}
|
||||
|
||||
int ringbuffer_getLength(const RingBuffer rb)
|
||||
{
|
||||
return rb->length;
|
||||
}
|
||||
|
||||
int ringbuffer_getStart(const RingBuffer rb)
|
||||
{
|
||||
return rb->start;
|
||||
|
Loading…
Reference in New Issue
Block a user