From 72ab32d4ef203a5a8d43a1ad5cea00696d81a475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 6 Jun 2025 21:17:56 +0200 Subject: [PATCH] shared: Do not print deprecations when compiling own code We keep and use old functions in code for the compatibility reasons with older API versions. Do not print warnings about them being deprecated when compiling Clapper library that has and uses such function internally. --- src/lib/shared/clapper-api-visibility.h.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/shared/clapper-api-visibility.h.in b/src/lib/shared/clapper-api-visibility.h.in index 4a02dde5..60a5314b 100644 --- a/src/lib/shared/clapper-api-visibility.h.in +++ b/src/lib/shared/clapper-api-visibility.h.in @@ -41,5 +41,11 @@ #endif #define @CLAPPER_API@_API _@CLAPPER_API@_VISIBILITY + +#if !defined(@CLAPPER_API@_COMPILATION) #define @CLAPPER_API@_DEPRECATED G_DEPRECATED _@CLAPPER_API@_VISIBILITY #define @CLAPPER_API@_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _@CLAPPER_API@_VISIBILITY +#else +#define @CLAPPER_API@_DEPRECATED _@CLAPPER_API@_VISIBILITY +#define @CLAPPER_API@_DEPRECATED_FOR(f) _@CLAPPER_API@_VISIBILITY +#endif