Skip to content
Permalink
Browse files

currency: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Jan 29, 2019
1 parent fc0720e commit 2c4aba1d817c77ba44903bedcc477d815873e2ed
Showing with 2 additions and 3 deletions.
  1. +2 −3 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);
}

0 comments on commit 2c4aba1

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