[gnome-software/wip/kalev/session-api-regular-packages: 1/5] trivial: Move a struct definition to the top of the file



commit 9320b5945d67f678261616c40307c3eb966b2c69
Author: Kalev Lember <kalevlember gmail com>
Date:   Sun May 10 19:54:37 2015 +0200

    trivial: Move a struct definition to the top of the file
    
    This let's us use it in the following commit.

 src/gs-plugin-loader.c |   60 ++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 32 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 8fc3ccf..eeab414 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -66,6 +66,34 @@ enum {
 
 static guint signals [SIGNAL_LAST] = { 0 };
 
+/* async state */
+typedef struct {
+       const gchar                     *function_name;
+       GList                           *list;
+       GsPluginRefineFlags              flags;
+       gchar                           *value;
+       gchar                           *filename;
+       guint                            cache_age;
+       GsCategory                      *category;
+       GsApp                           *app;
+       AsAppState                       state_success;
+       AsAppState                       state_failure;
+} GsPluginLoaderAsyncState;
+
+static void
+gs_plugin_loader_free_async_state (GsPluginLoaderAsyncState *state)
+{
+       if (state->category != NULL)
+               g_object_unref (state->category);
+       if (state->app != NULL)
+               g_object_unref (state->app);
+
+       g_free (state->filename);
+       g_free (state->value);
+       gs_plugin_list_free (state->list);
+       g_slice_free (GsPluginLoaderAsyncState, state);
+}
+
 /**
  * gs_plugin_loader_error_quark:
  * Return value: Our personal error quark.
@@ -723,38 +751,6 @@ gs_plugin_loader_run_action (GsPluginLoader *plugin_loader,
 
 /******************************************************************************/
 
-/* async state */
-typedef struct {
-       const gchar                     *function_name;
-       GList                           *list;
-       GsPluginRefineFlags              flags;
-       gchar                           *value;
-       gchar                           *filename;
-       guint                            cache_age;
-       GsCategory                      *category;
-       GsApp                           *app;
-       AsAppState                       state_success;
-       AsAppState                       state_failure;
-} GsPluginLoaderAsyncState;
-
-/******************************************************************************/
-
-static void
-gs_plugin_loader_free_async_state (GsPluginLoaderAsyncState *state)
-{
-       if (state->category != NULL)
-               g_object_unref (state->category);
-       if (state->app != NULL)
-               g_object_unref (state->app);
-
-       g_free (state->filename);
-       g_free (state->value);
-       gs_plugin_list_free (state->list);
-       g_slice_free (GsPluginLoaderAsyncState, state);
-}
-
-/******************************************************************************/
-
 /**
  * gs_plugin_loader_merge_into_os_update:
  **/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]