diff options
author | David Robillard <d@drobilla.net> | 2016-03-16 16:21:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:15:32 +0200 |
commit | c678dcfa54f3cf6784ac505f9e669ee233ba34c9 (patch) | |
tree | 9609a6978f1c25d009543d6d88043078b613a0c4 /src/byte_source.c | |
parent | 2a480d8cc56fe4d29fba2759b62d9f09fc0cc87e (diff) | |
download | serd-c678dcfa54f3cf6784ac505f9e669ee233ba34c9.tar.gz serd-c678dcfa54f3cf6784ac505f9e669ee233ba34c9.tar.bz2 serd-c678dcfa54f3cf6784ac505f9e669ee233ba34c9.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 1a67157b..a2bbc4cf 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 }; @@ -77,13 +77,13 @@ 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; - source->read_buf = utf8; + source->read_buf = (const uint8_t*)utf8; return SERD_SUCCESS; } |