From 085e63e53502adfc16c3830ed6b0b941314b8f8a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 16 Mar 2016 16:21:20 -0400 Subject: Use char* for strings in public API The constant casting just makes user code a mess, for no benefit. --- src/byte_sink.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/byte_sink.h') diff --git a/src/byte_sink.h b/src/byte_sink.h index f39bc2ba..f9b8a12a 100644 --- a/src/byte_sink.h +++ b/src/byte_sink.h @@ -28,7 +28,7 @@ typedef struct SerdByteSinkImpl { SerdSink sink; void* stream; - uint8_t* buf; + char* buf; size_t size; size_t block_size; } SerdByteSink; @@ -42,7 +42,7 @@ serd_byte_sink_new(SerdSink sink, void* stream, size_t block_size) bsink.size = 0; bsink.block_size = block_size; bsink.buf = ((block_size > 1) - ? (uint8_t*)serd_bufalloc(block_size) + ? (char*)serd_bufalloc(block_size) : NULL); return bsink; } @@ -81,7 +81,7 @@ serd_byte_sink_write(const void* buf, size_t len, SerdByteSink* bsink) // Write as much as possible into the remaining buffer space memcpy(bsink->buf + bsink->size, buf, n); bsink->size += n; - buf = (const uint8_t*)buf + n; + buf = (const char*)buf + n; len -= n; // Flush page if buffer is full -- cgit v1.2.1