From d44fb19da9f3d06f8873958e10647d5f0eae7789 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 14 Apr 2026 11:08:31 +1000 Subject: fix(stream): Stdio bridge write callback and const correctness --- include/bridges/stdio/stream_bridge.h | 2 +- include/tinyff/common.h | 2 +- include/tinyff/stream.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/bridges/stdio/stream_bridge.h b/include/bridges/stdio/stream_bridge.h index 561fa8a..219b101 100644 --- a/include/bridges/stdio/stream_bridge.h +++ b/include/bridges/stdio/stream_bridge.h @@ -4,7 +4,7 @@ // Default reads for common types (just FILE for now, memory later) size_t ff_file_read(void *ptr, size_t size, void *user); -size_t ff_file_write(const void *ptr, size_t size, void *user); +size_t ff_file_write(const void *ptr, size_t size, const void *user); // Stream creation helpers ff_stream ff_create_file_stream(FILE *f); \ No newline at end of file diff --git a/include/tinyff/common.h b/include/tinyff/common.h index 3653807..c22f595 100644 --- a/include/tinyff/common.h +++ b/include/tinyff/common.h @@ -62,7 +62,7 @@ typedef struct { typedef struct { // Debug settings - ff_stream* ff_debug_stream; + ff_stream ff_debug_stream; ff_flag ff_debug_enabled; // Allocation diff --git a/include/tinyff/stream.h b/include/tinyff/stream.h index 250767e..95c5884 100644 --- a/include/tinyff/stream.h +++ b/include/tinyff/stream.h @@ -4,7 +4,7 @@ #include -#define FF_NULL_STREAM {0} +#define FF_NULL_STREAM (ff_stream){0} -- cgit v1.2.3