weston_log_ctx_compositor_*() API problems
-
weston_log_ctx_compositor_create()
should be calledweston_log_ctx_create()
because it has no relation to any compositor. -
weston_log_ctx_compositor_setup()
should be folded intoweston_compositor_create()
and disappear. -
weston_log_ctx_compositor_destroy()
takes aweston_compositor
as argument, how is one supposed to destroy a log context that was never associated with anyweston_compositor
? Instead,weston_log_ctx_destroy()
should take aweston_log_context
as the argument.
The last one is not trivial because of weston_log_context::global
which needs to be destroyed with weston_compositor
. Maybe that variable should live in struct weston_compositor
instead?