From 03c1c6382d58f2205fa0d61882a5472dc7463741 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Sep 2023 06:18:16 -0400 Subject: [PATCH] dbusauthmechanism: Stop using g_type_class_ref/unref These are just wrappers for g_type_class_get/nothing now. --- gio/gdbusauthmechanism.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gio/gdbusauthmechanism.c b/gio/gdbusauthmechanism.c index 6e494dbd9..ea953bafb 100644 --- a/gio/gdbusauthmechanism.c +++ b/gio/gdbusauthmechanism.c @@ -188,10 +188,8 @@ _g_dbus_auth_mechanism_get_name (GType mechanism_type) g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), NULL); - klass = g_type_class_ref (mechanism_type); - g_assert (klass != NULL); + klass = g_type_class_get (mechanism_type); name = klass->get_name (); - //g_type_class_unref (klass); return name; } @@ -204,10 +202,8 @@ _g_dbus_auth_mechanism_get_priority (GType mechanism_type) g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), 0); - klass = g_type_class_ref (mechanism_type); - g_assert (klass != NULL); + klass = g_type_class_get (mechanism_type); priority = klass->get_priority (); - //g_type_class_unref (klass); return priority; }