Skip to content
Permalink
Browse files

unit-manager: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Jan 29, 2019
1 parent 25f0f0a commit a61f07d0f1dc4ab88ad655ef23cbcd66277980cf
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/unit-manager.c
@@ -20,7 +20,7 @@ struct UnitManagerPrivate
GList *categories;
};

G_DEFINE_TYPE (UnitManager, unit_manager, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (UnitManager, unit_manager, G_TYPE_OBJECT);


static UnitManager *default_unit_manager = NULL;
@@ -257,12 +257,11 @@ unit_manager_convert_by_symbol(UnitManager *manager, const MPNumber *x, const ch
static void
unit_manager_class_init(UnitManagerClass *klass)
{
g_type_class_add_private(klass, sizeof(UnitManagerPrivate));
}


static void
unit_manager_init(UnitManager *manager)
{
manager->priv = G_TYPE_INSTANCE_GET_PRIVATE(manager, unit_manager_get_type(), UnitManagerPrivate);
manager->priv = unit_manager_get_instance_private (manager);
}

0 comments on commit a61f07d

Please sign in to comment.
You can’t perform that action at this time.