mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
GDBusProxy: Make interface lookups O(1)
Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
91f97ebbaa
commit
b845c62c7f
@ -166,7 +166,10 @@ g_dbus_proxy_finalize (GObject *object)
|
||||
g_hash_table_unref (proxy->priv->properties);
|
||||
|
||||
if (proxy->priv->expected_interface != NULL)
|
||||
g_dbus_interface_info_unref (proxy->priv->expected_interface);
|
||||
{
|
||||
g_dbus_interface_info_cache_release (proxy->priv->expected_interface);
|
||||
g_dbus_interface_info_unref (proxy->priv->expected_interface);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (g_dbus_proxy_parent_class)->finalize (object);
|
||||
}
|
||||
@ -2093,8 +2096,13 @@ g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
|
||||
{
|
||||
g_return_if_fail (G_IS_DBUS_PROXY (proxy));
|
||||
if (proxy->priv->expected_interface != NULL)
|
||||
g_dbus_interface_info_unref (proxy->priv->expected_interface);
|
||||
{
|
||||
g_dbus_interface_info_cache_release (proxy->priv->expected_interface);
|
||||
g_dbus_interface_info_unref (proxy->priv->expected_interface);
|
||||
}
|
||||
proxy->priv->expected_interface = info != NULL ? g_dbus_interface_info_ref (info) : NULL;
|
||||
if (proxy->priv->expected_interface != NULL)
|
||||
g_dbus_interface_info_cache_build (proxy->priv->expected_interface);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user