mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
spa: support: log: convert spa_log_topic_init() to a function
There is no reason for this to be a macro.
This commit is contained in:
parent
181fbfee6d
commit
0366a52f3a
1 changed files with 7 additions and 9 deletions
|
|
@ -194,15 +194,13 @@ struct spa_log_methods {
|
|||
#define SPA_LOG_TOPIC(v, t) \
|
||||
(struct spa_log_topic){ .version = (v), .topic = (t)}
|
||||
|
||||
#define spa_log_topic_init(l, topic) \
|
||||
do { \
|
||||
struct spa_log *_l = l; \
|
||||
if (SPA_LIKELY(_l)) { \
|
||||
struct spa_interface *_if = &_l->iface; \
|
||||
spa_interface_call(_if, struct spa_log_methods, \
|
||||
topic_init, 1, topic); \
|
||||
} \
|
||||
} while(0)
|
||||
static inline void spa_log_topic_init(struct spa_log *log, struct spa_log_topic *topic)
|
||||
{
|
||||
if (SPA_UNLIKELY(!log))
|
||||
return;
|
||||
|
||||
spa_interface_call(&log->iface, struct spa_log_methods, topic_init, 1, topic);
|
||||
}
|
||||
|
||||
/* Unused, left for backwards compat */
|
||||
#define spa_log_level_enabled(l,lev) ((l) && (l)->level >= (lev))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue