mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 11:28:26 +02:00
drm: Use weston_log_scope_puts when we don't have a format string
We can use __VA_OPT__ to make a macro that automatically selects between the puts and printf log scope variants. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
ec5a7ee8fe
commit
978052f9ed
1 changed files with 9 additions and 2 deletions
|
|
@ -117,8 +117,15 @@
|
|||
* system. To avoid confusing side effects, we explicitly cast to the widest
|
||||
* possible type and use a matching format specifier.
|
||||
*/
|
||||
#define drm_debug(b, ...) \
|
||||
weston_log_scope_printf((b)->debug, __VA_ARGS__)
|
||||
#define DO_DRM_DEBUG_COMPLEX(scope, ...) \
|
||||
weston_log_scope_printf(scope, __VA_ARGS__)
|
||||
|
||||
#define DO_DRM_DEBUG(scope, string) \
|
||||
weston_log_scope_puts(scope, string)
|
||||
|
||||
#define drm_debug(b, format, ...) \
|
||||
DO_DRM_DEBUG ## __VA_OPT__(_COMPLEX) \
|
||||
((b)->debug, format __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
#define MAX_CLONED_CONNECTORS 4
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue