[gnome-software: 56/72] gs-plugin-loader: Inline a helper function
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 56/72] gs-plugin-loader: Inline a helper function
- Date: Wed, 15 Dec 2021 13:00:56 +0000 (UTC)
commit 985cfa7d74b6733c85073604114e8e463e2bc16d
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Nov 23 17:35:17 2021 +0000
gs-plugin-loader: Inline a helper function
The helper function doesn’t do anything particularly useful, and is
slightly in the way of further refactoring.
This introduces no functional changes.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
lib/gs-plugin-loader.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 0df4b77d3..f988638cd 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -283,13 +283,6 @@ gs_plugin_loader_helper_free (GsPluginLoaderHelper *helper)
g_slice_free (GsPluginLoaderHelper, helper);
}
-static void
-gs_plugin_loader_job_debug (GsPluginLoaderHelper *helper)
-{
- g_autofree gchar *str = gs_plugin_job_to_string (helper->plugin_job);
- g_debug ("%s", str);
-}
-
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GsPluginLoaderHelper, gs_plugin_loader_helper_free)
static gint
@@ -1593,6 +1586,7 @@ gs_plugin_loader_job_get_categories_thread_cb (GTask *task,
g_autoptr(GMainContextPusher) pusher = g_main_context_pusher_new (context);
GsCategory * const *categories = NULL;
gsize n_categories;
+ g_autofree gchar *job_debug = NULL;
#ifdef HAVE_SYSPROF
gint64 begin_time_nsec G_GNUC_UNUSED = SYSPROF_CAPTURE_CURRENT_TIME;
#endif
@@ -1631,7 +1625,8 @@ gs_plugin_loader_job_get_categories_thread_cb (GTask *task,
#endif /* HAVE_SYSPROF */
/* show elapsed time */
- gs_plugin_loader_job_debug (helper);
+ job_debug = gs_plugin_job_to_string (helper->plugin_job);
+ g_debug ("%s", job_debug);
/* success */
if (helper->catlist->len == 0)
@@ -3408,6 +3403,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
GsAppListSortFunc sort_func;
g_autoptr(GMainContext) context = g_main_context_new ();
g_autoptr(GMainContextPusher) pusher = g_main_context_pusher_new (context);
+ g_autofree gchar *job_debug = NULL;
#ifdef HAVE_SYSPROF
gint64 begin_time_nsec G_GNUC_UNUSED = SYSPROF_CAPTURE_CURRENT_TIME;
#endif
@@ -3755,7 +3751,8 @@ gs_plugin_loader_process_thread_cb (GTask *task,
#endif /* HAVE_SYSPROF */
/* show elapsed time */
- gs_plugin_loader_job_debug (helper);
+ job_debug = gs_plugin_job_to_string (helper->plugin_job);
+ g_debug ("%s", job_debug);
/* success */
g_task_return_pointer (task, g_object_ref (list), (GDestroyNotify) g_object_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]