From 5ab348fd30e34bb19221a6d368377273b9fc2974 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 20 Apr 2026 21:41:38 +0100 Subject: [PATCH] core: rename write_string functions to write_cstr --- core/error.c | 8 ++++---- core/include/fx/core/stream.h | 2 +- core/rope.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/error.c b/core/error.c index 78ae907..0289dbf 100644 --- a/core/error.c +++ b/core/error.c @@ -756,18 +756,18 @@ static void get_error_id( fx_stringstream *id = fx_stringstream_create_with_buffer(out, max); if (vendor_name) { - fx_stream_write_string(id, vendor_name, NULL); + fx_stream_write_cstr(id, vendor_name, NULL); } if (error_name) { if (vendor_name) { - fx_stream_write_string(id, ".", NULL); + fx_stream_write_cstr(id, ".", NULL); } - fx_stream_write_string(id, error_name, NULL); + fx_stream_write_cstr(id, error_name, NULL); } else { if (vendor_name) { - fx_stream_write_string(id, "#", NULL); + fx_stream_write_cstr(id, "#", NULL); } fx_stream_write_fmt(id, NULL, "%ld", code); diff --git a/core/include/fx/core/stream.h b/core/include/fx/core/stream.h index 3f51883..afb0fc5 100644 --- a/core/include/fx/core/stream.h +++ b/core/include/fx/core/stream.h @@ -84,7 +84,7 @@ FX_API fx_status fx_stream_read_all_bytes_s( fx_stream *src, fx_stream *dest, fx_stream_buffer *buffer, size_t *nr_read); FX_API fx_status fx_stream_write_char(fx_stream *stream, fx_wchar c); -FX_API fx_status fx_stream_write_string( +FX_API fx_status fx_stream_write_cstr( fx_stream *stream, const char *s, size_t *nr_written); FX_API fx_status fx_stream_write_bytes( diff --git a/core/rope.c b/core/rope.c index 2a440c1..536e55d 100644 --- a/core/rope.c +++ b/core/rope.c @@ -238,7 +238,7 @@ static void to_stream(const struct fx_rope *rope, void *arg) case FX_ROPE_F_CSTR: case FX_ROPE_F_CSTR_BORROWED: case FX_ROPE_F_CSTR_STATIC: - fx_stream_write_string(out, rope->r_v.v_cstr.s, NULL); + fx_stream_write_cstr(out, rope->r_v.v_cstr.s, NULL); break; case FX_ROPE_F_INT: fx_stream_write_fmt(out, NULL, "%" PRIdPTR, rope->r_v.v_int);