diff options
author | Wu Xiaotian <[email protected]> | 2019-06-30 17:49:52 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-02 13:41:11 +0200 |
commit | ceedb3408e9f12f1b36ad98218fee69960eb47e8 (patch) | |
tree | d9917bc70002c55b0ce310c6c800603bbf8c5b3d /backends/oss/oss-backend.c | |
parent | ead1fde223a89a5157e936d23b3bbc5d77260167 (diff) | |
download | libmatemixer-ceedb3408e9f12f1b36ad98218fee69960eb47e8.tar.bz2 libmatemixer-ceedb3408e9f12f1b36ad98218fee69960eb47e8.tar.xz |
oss: avoid deprecated g_type_class_add_private
Diffstat (limited to 'backends/oss/oss-backend.c')
-rw-r--r-- | backends/oss/oss-backend.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/backends/oss/oss-backend.c b/backends/oss/oss-backend.c index 9726570..792367e 100644 --- a/backends/oss/oss-backend.c +++ b/backends/oss/oss-backend.c @@ -61,7 +61,7 @@ static void oss_backend_finalize (GObject *object); #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-function" -G_DEFINE_DYNAMIC_TYPE (OssBackend, oss_backend, MATE_MIXER_TYPE_BACKEND) +G_DEFINE_DYNAMIC_TYPE_EXTENDED (OssBackend, oss_backend, MATE_MIXER_TYPE_BACKEND, 0, G_ADD_PRIVATE (OssBackend)) #pragma clang diagnostic pop static gboolean oss_backend_open (MateMixerBackend *backend); @@ -142,8 +142,6 @@ oss_backend_class_init (OssBackendClass *klass) backend_class->close = oss_backend_close; backend_class->list_devices = oss_backend_list_devices; backend_class->list_streams = oss_backend_list_streams; - - g_type_class_add_private (object_class, sizeof (OssBackendPrivate)); } /* Called in the code generated by G_DEFINE_DYNAMIC_TYPE() */ @@ -155,9 +153,7 @@ oss_backend_class_finalize (OssBackendClass *klass) static void oss_backend_init (OssBackend *oss) { - oss->priv = G_TYPE_INSTANCE_GET_PRIVATE (oss, - OSS_TYPE_BACKEND, - OssBackendPrivate); + oss->priv = oss_backend_get_instance_private (oss); oss->priv->devices_paths = g_hash_table_new_full (g_str_hash, g_str_equal, |