From 498b37841f36c86a27b75b97a4fc22053da94ffa Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Sun, 30 Jun 2019 17:33:00 +0800 Subject: pulse: avoid deprecated g_type_class_add_private --- backends/pulse/pulse-monitor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'backends/pulse/pulse-monitor.c') diff --git a/backends/pulse/pulse-monitor.c b/backends/pulse/pulse-monitor.c index 915b71b..585e5e8 100644 --- a/backends/pulse/pulse-monitor.c +++ b/backends/pulse/pulse-monitor.c @@ -64,7 +64,7 @@ static void pulse_monitor_set_property (GObject *object, static void pulse_monitor_init (PulseMonitor *monitor); static void pulse_monitor_finalize (GObject *object); -G_DEFINE_TYPE (PulseMonitor, pulse_monitor, G_TYPE_OBJECT); +G_DEFINE_TYPE_WITH_PRIVATE (PulseMonitor, pulse_monitor, G_TYPE_OBJECT); static gboolean stream_connect (PulseMonitor *monitor); @@ -125,8 +125,6 @@ pulse_monitor_class_init (PulseMonitorClass *klass) G_TYPE_NONE, 1, G_TYPE_DOUBLE); - - g_type_class_add_private (object_class, sizeof (PulseMonitorPrivate)); } static void @@ -181,9 +179,7 @@ pulse_monitor_set_property (GObject *object, static void pulse_monitor_init (PulseMonitor *monitor) { - monitor->priv = G_TYPE_INSTANCE_GET_PRIVATE (monitor, - PULSE_TYPE_MONITOR, - PulseMonitorPrivate); + monitor->priv = pulse_monitor_get_instance_private (monitor); } static void -- cgit v1.2.1