diff options
author | David Robillard <d@drobilla.net> | 2016-03-16 16:21:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 18:18:30 +0200 |
commit | 8ce3b77e73a6c172dc0954b3f5aa0e37a10850d0 (patch) | |
tree | 9d894ecb157e9c977657dc3dd4d9ca06b3c3e9b0 /src/byte_source.c | |
parent | 88ea0c449a8daa8951eca0ae69fd376f86122982 (diff) | |
download | serd-8ce3b77e73a6c172dc0954b3f5aa0e37a10850d0.tar.gz serd-8ce3b77e73a6c172dc0954b3f5aa0e37a10850d0.tar.bz2 serd-8ce3b77e73a6c172dc0954b3f5aa0e37a10850d0.zip |
Use char* for strings in public API
The constant casting just makes user code a mess, for no benefit.
Diffstat (limited to 'src/byte_source.c')
-rw-r--r-- | src/byte_source.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/byte_source.c b/src/byte_source.c index e2bcf196..74ce14a4 100644 --- a/src/byte_source.c +++ b/src/byte_source.c @@ -38,7 +38,7 @@ serd_byte_source_open_source(SerdByteSource* source, SerdSource read_func, SerdStreamErrorFunc error_func, void* stream, - const uint8_t* name, + const char* name, size_t page_size) { const Cursor cur = { name, 1, 1 }; @@ -52,7 +52,7 @@ serd_byte_source_open_source(SerdByteSource* source, source->read_func = read_func; if (page_size > 1) { - source->file_buf = (uint8_t*)serd_bufalloc(page_size); + source->file_buf = (char*)serd_bufalloc(page_size); source->read_buf = source->file_buf; memset(source->file_buf, '\0', page_size); } else { @@ -78,9 +78,9 @@ serd_byte_source_prepare(SerdByteSource* source) } SerdStatus -serd_byte_source_open_string(SerdByteSource* source, const uint8_t* utf8) +serd_byte_source_open_string(SerdByteSource* source, const char* utf8) { - const Cursor cur = { (const uint8_t*)"(string)", 1, 1 }; + const Cursor cur = { "(string)", 1, 1 }; memset(source, '\0', sizeof(*source)); source->cur = cur; |