From 93eefb3e22e2ce0be76c520447c870d6b1566b72 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 24 Sep 2021 08:28:19 +0100 Subject: [PATCH] gdbusconnection: Move ExportedSubtree definition Move it further up the file, but make no changes to it. This will help with a subsequent commit. Signed-off-by: Philip Withnall Helps: #2400 --- gio/gdbusconnection.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index d730111f8..24a50fcf2 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -4113,6 +4113,33 @@ exported_interface_free (ExportedInterface *ei) g_free (ei); } +struct ExportedSubtree +{ + guint id; + gchar *object_path; + GDBusConnection *connection; + GDBusSubtreeVTable *vtable; + GDBusSubtreeFlags flags; + + GMainContext *context; + gpointer user_data; + GDestroyNotify user_data_free_func; +}; + +static void +exported_subtree_free (ExportedSubtree *es) +{ + call_destroy_notify (es->context, + es->user_data_free_func, + es->user_data); + + g_main_context_unref (es->context); + + _g_dbus_subtree_vtable_free (es->vtable); + g_free (es->object_path); + g_free (es); +} + /* ---------------------------------------------------------------------------------------------------- */ /* Convenience function to check if @registration_id (if not zero) or @@ -6401,33 +6428,6 @@ g_dbus_connection_call_with_unix_fd_list_sync (GDBusConnection *connection, /* ---------------------------------------------------------------------------------------------------- */ -struct ExportedSubtree -{ - guint id; - gchar *object_path; - GDBusConnection *connection; - GDBusSubtreeVTable *vtable; - GDBusSubtreeFlags flags; - - GMainContext *context; - gpointer user_data; - GDestroyNotify user_data_free_func; -}; - -static void -exported_subtree_free (ExportedSubtree *es) -{ - call_destroy_notify (es->context, - es->user_data_free_func, - es->user_data); - - g_main_context_unref (es->context); - - _g_dbus_subtree_vtable_free (es->vtable); - g_free (es->object_path); - g_free (es); -} - /* called without lock held in the thread where the caller registered * the subtree */