mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -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" {
|
||||
#endif
|
||||
|
||||
/* GCC visibility */
|
||||
/** Visibility attribute */
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define WL_EXPORT __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define WL_EXPORT
|
||||
#endif
|
||||
|
||||
/* Deprecated attribute */
|
||||
/** Deprecated attribute */
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define WL_DEPRECATED __attribute__ ((deprecated))
|
||||
#else
|
||||
#define WL_DEPRECATED
|
||||
#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
|
||||
#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue