From 2c4aba1d817c77ba44903bedcc477d815873e2ed Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Tue, 29 Jan 2019 19:46:26 +0100 Subject: currency: avoid deprecated 'g_type_class_add_private' --- src/currency.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/currency.c b/src/currency.c index ea81761..312e661 100644 --- a/src/currency.c +++ b/src/currency.c @@ -23,7 +23,7 @@ struct CurrencyPrivate MPNumber value; }; -G_DEFINE_TYPE (Currency, currency, G_TYPE_OBJECT); +G_DEFINE_TYPE_WITH_PRIVATE (Currency, currency, G_TYPE_OBJECT); Currency * @@ -85,12 +85,11 @@ currency_get_value(Currency *currency) static void currency_class_init(CurrencyClass *klass) { - g_type_class_add_private(klass, sizeof(CurrencyPrivate)); } static void currency_init(Currency *currency) { - currency->priv = G_TYPE_INSTANCE_GET_PRIVATE(currency, currency_get_type(), CurrencyPrivate); + currency->priv = currency_get_instance_private (currency); } -- cgit v1.2.1