diff options
author | Pablo Barciela <[email protected]> | 2019-01-29 19:46:26 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-01-30 20:18:39 +0100 |
commit | 2c4aba1d817c77ba44903bedcc477d815873e2ed (patch) | |
tree | b852c80f839644042adebf7afbd8108c8edd1448 | |
parent | fc0720e957613ba78e11c05da75b6611ec779498 (diff) | |
download | mate-calc-2c4aba1d817c77ba44903bedcc477d815873e2ed.tar.bz2 mate-calc-2c4aba1d817c77ba44903bedcc477d815873e2ed.tar.xz |
currency: avoid deprecated 'g_type_class_add_private'
-rw-r--r-- | src/currency.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); } |