mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-17 06:48:10 +02:00
Revert "lib: object: allow also using static interfaces using the WpObject API"
This reverts commit daa49af541.
This commit is contained in:
parent
41b1f40053
commit
bd1c233f43
1 changed files with 3 additions and 16 deletions
|
|
@ -21,20 +21,9 @@ static void
|
|||
wp_object_init (WpObject * self)
|
||||
{
|
||||
WpObjectPrivate *priv = wp_object_get_instance_private (self);
|
||||
g_autofree GType *static_ifaces;
|
||||
guint n_static_ifaces, i;
|
||||
|
||||
priv->iface_objects = g_array_new (FALSE, FALSE, sizeof (gpointer));
|
||||
priv->iface_types = g_array_new (FALSE, FALSE, sizeof (GType));
|
||||
|
||||
static_ifaces = g_type_interfaces (G_TYPE_FROM_INSTANCE (self),
|
||||
&n_static_ifaces);
|
||||
if (n_static_ifaces > 0) {
|
||||
g_array_append_vals (priv->iface_types, static_ifaces, n_static_ifaces);
|
||||
for (i = 0; i < n_static_ifaces; i++) {
|
||||
g_array_append_val (priv->iface_objects, self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -45,11 +34,9 @@ wp_object_finalize (GObject * obj)
|
|||
guint i;
|
||||
|
||||
for (i = 0; i < priv->iface_objects->len; i++) {
|
||||
GObject *o = g_array_index (priv->iface_objects, GObject*, i);
|
||||
if (o != obj) {
|
||||
wp_interface_impl_set_object (WP_INTERFACE_IMPL (o), NULL);
|
||||
g_object_unref (o);
|
||||
}
|
||||
GObject *obj = g_array_index (priv->iface_objects, GObject*, i);
|
||||
wp_interface_impl_set_object (WP_INTERFACE_IMPL (obj), NULL);
|
||||
g_object_unref (obj);
|
||||
}
|
||||
|
||||
g_array_free (priv->iface_objects, TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue