summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/unit-category.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/unit-category.c b/src/unit-category.c
index 56a90e2..875ea58 100644
--- a/src/unit-category.c
+++ b/src/unit-category.c
@@ -20,7 +20,7 @@ struct UnitCategoryPrivate
GList *units;
};
-G_DEFINE_TYPE (UnitCategory, unit_category, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (UnitCategory, unit_category, G_TYPE_OBJECT);
UnitCategory *
@@ -125,12 +125,11 @@ unit_category_convert(UnitCategory *category, const MPNumber *x, Unit *x_units,
static void
unit_category_class_init(UnitCategoryClass *klass)
{
- g_type_class_add_private(klass, sizeof(UnitCategoryPrivate));
}
static void
unit_category_init(UnitCategory *category)
{
- category->priv = G_TYPE_INSTANCE_GET_PRIVATE(category, unit_category_get_type(), UnitCategoryPrivate);
+ category->priv = unit_category_get_instance_private (category);
}