@@ -35,6 +35,13 @@ extern "C" {
3535extern "C" {
3636#endif
3737
38+ #if defined(_MSC_VER )
39+ #define B2ND_DEPRECATED (msg ) __declspec(deprecated(msg))
40+ #elif defined(__GNUC__ ) || defined(__clang__ )
41+ #define B2ND_DEPRECATED (msg ) __attribute__((deprecated(msg)))
42+ #else
43+ #define B2ND_DEPRECATED (msg )
44+ #endif
3845
3946/* The version for metalayer format; starts from 0 and it must not exceed 127 */
4047#define B2ND_METALAYER_VERSION 0
@@ -569,14 +576,13 @@ BLOSC_EXPORT int b2nd_deserialize_meta(const uint8_t *smeta, int32_t smeta_len,
569576 * destination arrays before using this function, as it does not perform these
570577 * checks itself.
571578 */
579+ B2ND_DEPRECATED ("Use b2nd_copy_buffer2 instead." )
572580BLOSC_EXPORT int b2nd_copy_buffer (int8_t ndim ,
573581 uint8_t itemsize ,
574582 const void * src , const int64_t * src_pad_shape ,
575583 const int64_t * src_start , const int64_t * src_stop ,
576584 void * dst , const int64_t * dst_pad_shape ,
577- const int64_t * dst_start )
578- __attribute__((deprecated ("Use b2nd_copy_buffer2 instead" )));
579-
585+ const int64_t * dst_start );
580586
581587/**
582588 * @brief Copy a slice of a source array into another array. The arrays have
@@ -596,9 +602,9 @@ BLOSC_EXPORT int b2nd_copy_buffer(int8_t ndim,
596602 *
597603 * @return An error code.
598604 *
599- * @note This is a version of b2nd_copy_buffer that uses signed 32-bit integers for
600- * copying data. This is useful when the data is stored in a buffer that uses
601- * itemsizes that are larger than 255 bytes.
605+ * @note This is a version of (now deprecated) b2nd_copy_buffer() that uses
606+ * signed 32-bit integers for copying data. This is useful when data is stored
607+ * in a buffer that uses itemsizes that are larger than 255 bytes.
602608 *
603609 * @note Please make sure that slice boundaries fit within the source and
604610 * destination arrays before using this function, as it does not perform these
0 commit comments