From f014964f6f5a521e42721814033bf868a191d947 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Wed, 18 Dec 2019 15:52:18 -0300 Subject: [PATCH] weston-log: rename the confusing function name weston_compositor_log_scope_destroy() There's a function named weston_compositor_log_scope_destroy() but it doesn't take a struct weston_compositor argument. Rename it to weston_log_scope_destroy(), as the argument is a struct weston_log_scope. Signed-off-by: Leandro Ribeiro --- compositor/main.c | 4 ++-- doc/sphinx/toc/libweston/log.rst | 2 +- include/libweston/weston-log.h | 2 +- libweston/backend-drm/drm.c | 2 +- libweston/compositor.c | 4 ++-- libweston/content-protection.c | 2 +- libweston/weston-log.c | 6 +++--- pipewire/pipewire-plugin.c | 2 +- xwayland/launcher.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compositor/main.c b/compositor/main.c index 309904c9..e802badf 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3375,11 +3375,11 @@ out: if (protologger) wl_protocol_logger_destroy(protologger); - weston_compositor_log_scope_destroy(protocol_scope); + weston_log_scope_destroy(protocol_scope); protocol_scope = NULL; weston_compositor_tear_down(wet.compositor); - weston_compositor_log_scope_destroy(log_scope); + weston_log_scope_destroy(log_scope); log_scope = NULL; weston_log_ctx_compositor_destroy(wet.compositor); weston_compositor_destroy(wet.compositor); diff --git a/doc/sphinx/toc/libweston/log.rst b/doc/sphinx/toc/libweston/log.rst index e1b03337..2d48e489 100644 --- a/doc/sphinx/toc/libweston/log.rst +++ b/doc/sphinx/toc/libweston/log.rst @@ -39,7 +39,7 @@ scope. important for the subscription part, detailed bit later. Log scopes are managed **explicitly**, and destroying the scope is done using -:func:`weston_compositor_log_scope_destroy`. +:func:`weston_log_scope_destroy`. Available scopes in weston ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/include/libweston/weston-log.h b/include/libweston/weston-log.h index 40b88571..5b6ed1b1 100644 --- a/include/libweston/weston-log.h +++ b/include/libweston/weston-log.h @@ -71,7 +71,7 @@ weston_log_ctx_add_log_scope(struct weston_log_context *log_ctx, void *user_data); void -weston_compositor_log_scope_destroy(struct weston_log_scope *scope); +weston_log_scope_destroy(struct weston_log_scope *scope); bool weston_log_scope_is_enabled(struct weston_log_scope *scope); diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index 8780bebe..8395a546 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -2387,7 +2387,7 @@ drm_destroy(struct weston_compositor *ec) destroy_sprites(b); - weston_compositor_log_scope_destroy(b->debug); + weston_log_scope_destroy(b->debug); b->debug = NULL; weston_compositor_shutdown(ec); diff --git a/libweston/compositor.c b/libweston/compositor.c index 0a70c273..0166b73a 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -7699,10 +7699,10 @@ weston_compositor_tear_down(struct weston_compositor *compositor) if (compositor->heads_changed_source) wl_event_source_remove(compositor->heads_changed_source); - weston_compositor_log_scope_destroy(compositor->debug_scene); + weston_log_scope_destroy(compositor->debug_scene); compositor->debug_scene = NULL; - weston_compositor_log_scope_destroy(compositor->timeline); + weston_log_scope_destroy(compositor->timeline); compositor->timeline = NULL; } diff --git a/libweston/content-protection.c b/libweston/content-protection.c index 0d9c4788..7b7d5419 100644 --- a/libweston/content-protection.c +++ b/libweston/content-protection.c @@ -186,7 +186,7 @@ cp_destroy_listener(struct wl_listener *listener, void *data) destroy_listener); wl_list_remove(&cp->destroy_listener.link); wl_list_remove(&cp->protected_list); - weston_compositor_log_scope_destroy(cp->debug); + weston_log_scope_destroy(cp->debug); cp->debug = NULL; cp->surface_protection_update = NULL; free(cp); diff --git a/libweston/weston-log.c b/libweston/weston-log.c index 57ad07be..20b9deae 100644 --- a/libweston/weston-log.c +++ b/libweston/weston-log.c @@ -573,7 +573,7 @@ weston_compositor_is_debug_protocol_enabled(struct weston_compositor *wc) * against the scope being created and if found will be added to the scope's * subscription list. * - * The log scope must be destroyed using weston_compositor_log_scope_destroy() + * The log scope must be destroyed using weston_log_scope_destroy() * before destroying the weston_compositor. * * @memberof weston_log_scope @@ -654,7 +654,7 @@ weston_log_ctx_add_log_scope(struct weston_log_context *log_ctx, * @memberof weston_log_scope */ WL_EXPORT void -weston_compositor_log_scope_destroy(struct weston_log_scope *scope) +weston_log_scope_destroy(struct weston_log_scope *scope) { struct weston_log_subscription *sub, *sub_tmp; @@ -726,7 +726,7 @@ weston_log_subscription_complete(struct weston_log_subscription *sub) * stream. Particularly useful for the weston-debug protocol. * * @memberof weston_log_scope - * @sa weston_log_ctx_add_log_scope, weston_compositor_log_scope_destroy + * @sa weston_log_ctx_add_log_scope, weston_log_scope_destroy */ WL_EXPORT void weston_log_scope_complete(struct weston_log_scope *scope) diff --git a/pipewire/pipewire-plugin.c b/pipewire/pipewire-plugin.c index d1e0a29e..26a12018 100644 --- a/pipewire/pipewire-plugin.c +++ b/pipewire/pipewire-plugin.c @@ -648,7 +648,7 @@ weston_pipewire_destroy(struct wl_listener *l, void *data) struct weston_pipewire *pipewire = wl_container_of(l, pipewire, destroy_listener); - weston_compositor_log_scope_destroy(pipewire->debug); + weston_log_scope_destroy(pipewire->debug); pipewire->debug = NULL; wl_event_source_remove(pipewire->loop_source); diff --git a/xwayland/launcher.c b/xwayland/launcher.c index e15dd4f6..bbea817c 100644 --- a/xwayland/launcher.c +++ b/xwayland/launcher.c @@ -230,7 +230,7 @@ weston_xserver_destroy(struct wl_listener *l, void *data) if (wxs->loop) weston_xserver_shutdown(wxs); - weston_compositor_log_scope_destroy(wxs->wm_debug); + weston_log_scope_destroy(wxs->wm_debug); free(wxs); }