From 5ea7c0d763685c23dc6933e273dfa11eec5bec14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 9 Sep 2021 14:30:19 -0400 Subject: Use simpler names for I/O function types --- src/input_stream.c | 12 ++++++------ src/output_stream.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/input_stream.c b/src/input_stream.c index 5755ccc3..e83f9e6a 100644 --- a/src/input_stream.c +++ b/src/input_stream.c @@ -64,10 +64,10 @@ serd_string_close(void* const stream) } SerdInputStream -serd_open_input_stream(SerdReadFunc SERD_NONNULL read_func, - SerdStreamErrorFunc SERD_NONNULL error_func, - SerdStreamCloseFunc SERD_NULLABLE close_func, - void* const stream) +serd_open_input_stream(SerdReadFunc SERD_NONNULL read_func, + SerdErrorFunc SERD_NONNULL error_func, + SerdCloseFunc SERD_NULLABLE close_func, + void* const stream) { assert(read_func); assert(error_func); @@ -126,8 +126,8 @@ serd_open_input_file(const char* const path) input.stream = file; input.read = (SerdReadFunc)fread; - input.error = (SerdStreamErrorFunc)ferror; - input.close = (SerdStreamCloseFunc)fclose; + input.error = (SerdErrorFunc)ferror; + input.close = (SerdCloseFunc)fclose; return input; } diff --git a/src/output_stream.c b/src/output_stream.c index 7beb5e2f..b98c834a 100644 --- a/src/output_stream.c +++ b/src/output_stream.c @@ -29,9 +29,9 @@ #endif SerdOutputStream -serd_open_output_stream(SerdWriteFunc const write_func, - SerdStreamCloseFunc const close_func, - void* const stream) +serd_open_output_stream(SerdWriteFunc const write_func, + SerdCloseFunc const close_func, + void* const stream) { assert(write_func); @@ -68,7 +68,7 @@ serd_open_output_file(const char* const path) #endif return serd_open_output_stream( - (SerdWriteFunc)fwrite, (SerdStreamCloseFunc)fclose, file); + (SerdWriteFunc)fwrite, (SerdCloseFunc)fclose, file); } SerdStatus -- cgit v1.2.1