From a9e849ff4f7e0d8e3f8c46de53f495e47c3019cc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 6 Jan 2014 21:38:25 +0100 Subject: DecoderBuffer: _read() returns ConstBuffer object --- src/DecoderBuffer.hxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/DecoderBuffer.hxx') diff --git a/src/DecoderBuffer.hxx b/src/DecoderBuffer.hxx index d09416b06..f298d4429 100644 --- a/src/DecoderBuffer.hxx +++ b/src/DecoderBuffer.hxx @@ -34,6 +34,8 @@ struct DecoderBuffer; struct Decoder; struct InputStream; +template struct ConstBuffer; + /** * Creates a new buffer. * @@ -80,13 +82,10 @@ decoder_buffer_fill(DecoderBuffer *buffer); * decoder_buffer_consume() call. * * @param buffer the decoder_buffer object - * @param length_r pointer to a size_t where you will receive the - * number of bytes available - * @return a pointer to the read buffer, or nullptr if there is no data - * available */ -const void * -decoder_buffer_read(const DecoderBuffer *buffer, size_t *length_r); +gcc_pure +ConstBuffer +decoder_buffer_read(const DecoderBuffer *buffer); /** * Consume (delete, invalidate) a part of the buffer. The "nbytes" -- cgit v1.2.3