Skip to content

Commit

Permalink
unit-manager: avoid deprecated 'g_type_class_add_private'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w committed Jan 30, 2019
1 parent 25f0f0a commit a61f07d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/unit-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.