--- a/src/cx/streams.h Sun Dec 28 15:45:39 2025 +0100 +++ b/src/cx/streams.h Sun Dec 28 17:31:20 2025 +0100 @@ -41,10 +41,6 @@ #include "common.h" -#ifdef __cplusplus -extern "C" { -#endif - /** * Reads data from a stream and writes it to another stream. * @@ -61,9 +57,9 @@ * iterations. * @return the total number of bytes copied */ -cx_attr_nonnull_arg(1, 2, 3, 4) -cx_attr_access_r(1) cx_attr_access_w(2) cx_attr_access_w(5) -CX_EXPORT size_t cx_stream_bncopy(void *src, void *dest, +CX_EXTERN CX_NONNULL_ARG(1, 2, 3, 4) +CX_ACCESS_R(1) CX_ACCESS_W(2) CX_ACCESS_W(5) +size_t cx_stream_bncopy(void *src, void *dest, cx_read_func rfnc, cx_write_func wfnc, char *buf, size_t bufsize, size_t n); @@ -95,8 +91,8 @@ * @param n the maximum number of bytes that shall be copied. * @return total number of bytes copied */ -cx_attr_nonnull cx_attr_access_r(1) cx_attr_access_w(2) -CX_EXPORT size_t cx_stream_ncopy(void *src, void *dest, +CX_EXTERN CX_NONNULL CX_ACCESS_R(1) CX_ACCESS_W(2) +size_t cx_stream_ncopy(void *src, void *dest, cx_read_func rfnc, cx_write_func wfnc, size_t n); /** @@ -113,8 +109,4 @@ #define cx_stream_copy(src, dest, rfnc, wfnc) \ cx_stream_ncopy(src, dest, rfnc, wfnc, SIZE_MAX) -#ifdef __cplusplus -} -#endif - #endif // UCX_STREAMS_H