From 5c1130819c60f52a3ab1a27711f4d8cca7a4cd14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 14 Nov 2020 12:31:02 +0100 Subject: Deprecate serd_uri_to_path() --- include/serd/serd.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/serd/serd.h b/include/serd/serd.h index c7da9fc7..6d822643 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -56,6 +56,16 @@ #define SERD_PURE_API SERD_API SERD_PURE_FUNC #define SERD_CONST_API SERD_API SERD_CONST_FUNC +#ifndef SERD_DISABLE_DEPRECATED +# if defined(__clang__) +# define SERD_DEPRECATED_BY(rep) __attribute__((deprecated("", rep))) +# elif defined(__GNUC__) +# define SERD_DEPRECATED_BY(rep) __attribute__((deprecated("Use " rep))) +# else +# define SERD_DEPRECATED_BY(rep) +# endif +#endif + #ifdef __cplusplus extern "C" { # if defined(__GNUC__) @@ -352,7 +362,7 @@ static const SerdURI SERD_URI_NULL = { encoding and other issues are not handled, to properly convert a file URI to a path, use serd_file_uri_parse(). */ -SERD_API +SERD_API SERD_DEPRECATED_BY("serd_file_uri_parse") const uint8_t* SERD_NULLABLE serd_uri_to_path(const uint8_t* SERD_NONNULL uri); -- cgit v1.2.1