From 352ea97f8fb4977d2d3ae086472ee6c3032dc21f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 2 Apr 2010 21:51:19 -0700 Subject: [PATCH] Hide internals of ring buffer structure --- gatchat/ringbuffer.c | 7 +++++++ gatchat/ringbuffer.h | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gatchat/ringbuffer.c b/gatchat/ringbuffer.c index 23bcaed7..f82a9f9d 100644 --- a/gatchat/ringbuffer.c +++ b/gatchat/ringbuffer.c @@ -31,6 +31,13 @@ #define MAX_SIZE 262144 +struct ring_buffer { + unsigned char *buffer; + unsigned int size; + unsigned int in; + unsigned int out; +}; + struct ring_buffer *ring_buffer_new(unsigned int size) { unsigned int real_size = 1; diff --git a/gatchat/ringbuffer.h b/gatchat/ringbuffer.h index 486c182d..f1bf3b8d 100644 --- a/gatchat/ringbuffer.h +++ b/gatchat/ringbuffer.h @@ -19,12 +19,7 @@ * */ -struct ring_buffer { - unsigned char *buffer; - unsigned int size; - unsigned int in; - unsigned int out; -}; +struct ring_buffer; /*! * Creates a new ring buffer with capacity size