void
log_msg(enum libinput_log_priority priority, const char *format, ...);
+void
+log_msg_va(enum libinput_log_priority priority,
+ const char *format,
+ va_list args);
int
libinput_init(struct libinput *libinput,
.user_data = NULL,
};
+void
+log_msg_va(enum libinput_log_priority priority,
+ const char *format,
+ va_list args)
+{
+ if (log_data.handler && log_data.priority <= priority)
+ log_data.handler(priority, log_data.user_data, format, args);
+}
+
void
log_msg(enum libinput_log_priority priority, const char *format, ...)
{
va_list args;
- if (log_data.handler && log_data.priority <= priority) {
- va_start(args, format);
- log_data.handler(priority, log_data.user_data, format, args);
- va_end(args);
- }
+ va_start(args, format);
+ log_msg_va(priority, format, args);
+ va_end(args);
}
LIBINPUT_EXPORT void