mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-12-21 13:20:10 +01:00
Add WL_PRINTF attribute and annotate wl_log_func_t
This commit is contained in:
parent
2142c03a8b
commit
00703ad2bc
1 changed files with 8 additions and 1 deletions
|
|
@ -51,6 +51,13 @@ extern "C" {
|
||||||
#define WL_DEPRECATED
|
#define WL_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Printf annotation */
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
|
#define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
|
||||||
|
#else
|
||||||
|
#define WL_PRINTF(x, y)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct wl_message {
|
struct wl_message {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *signature;
|
const char *signature;
|
||||||
|
|
@ -276,7 +283,7 @@ typedef int (*wl_dispatcher_func_t)(const void *, void *, uint32_t,
|
||||||
const struct wl_message *,
|
const struct wl_message *,
|
||||||
union wl_argument *);
|
union wl_argument *);
|
||||||
|
|
||||||
typedef void (*wl_log_func_t)(const char *, va_list);
|
typedef void (*wl_log_func_t)(const char *, va_list) WL_PRINTF(1, 0);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue