mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-19 05:34:02 -04:00
util: Document GCC attributes
Add doxygen comment blocks so these annotations are documented in the html documentation. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
a1ab2c03ae
commit
ae139d8b6b
1 changed files with 10 additions and 3 deletions
|
|
@ -40,21 +40,28 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GCC visibility */
|
/** Visibility attribute */
|
||||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
#define WL_EXPORT __attribute__ ((visibility("default")))
|
#define WL_EXPORT __attribute__ ((visibility("default")))
|
||||||
#else
|
#else
|
||||||
#define WL_EXPORT
|
#define WL_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Deprecated attribute */
|
/** Deprecated attribute */
|
||||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
#define WL_DEPRECATED __attribute__ ((deprecated))
|
#define WL_DEPRECATED __attribute__ ((deprecated))
|
||||||
#else
|
#else
|
||||||
#define WL_DEPRECATED
|
#define WL_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Printf annotation */
|
/**
|
||||||
|
* Printf-style argument attribute
|
||||||
|
*
|
||||||
|
* \param x Ordinality of the format string argument
|
||||||
|
* \param y Ordinality of the argument to check against the format string
|
||||||
|
*
|
||||||
|
* \sa https://gcc.gnu.org/onlinedocs/gcc-3.2.1/gcc/Function-Attributes.html
|
||||||
|
*/
|
||||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
|
#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue