ucx/cx/streams.h

changeset 1040
473d8cb58a6c
parent 1016
ccde46662db7
--- a/ucx/cx/streams.h	Wed Dec 31 12:37:09 2025 +0100
+++ b/ucx/cx/streams.h	Wed Dec 31 16:40:12 2025 +0100
@@ -36,15 +36,11 @@
  * @copyright 2-Clause BSD License
  */
 
-#ifndef Ucx_strEAMS_H
-#define Ucx_strEAMS_H
+#ifndef UCX_STREAMS_H
+#define UCX_STREAMS_H
 
 #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
+#endif // UCX_STREAMS_H

mercurial