api: introduce WLR_DEPRECATED

This commit is contained in:
Kirill Primak 2024-06-10 20:05:26 +03:00
parent 385c9ade5f
commit 6074cbe2eb
2 changed files with 21 additions and 0 deletions

20
include/wlr/api.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef WLR_API_H
#define WLR_API_H
#ifndef WLR_IMPLEMENTATION
#if __STDC_VERSION__ >= 202311L
#define WLR_DEPRECATED(msg) [[deprecated(msg)]]
#elif defined(__GNUC__)
#define WLR_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
#define WLR_DEPRECATED(msg)
#endif
#else
#define WLR_DEPRECATED(msg)
#endif
#endif