summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-26 00:06:25 +0200
committerlukefromdc <[email protected]>2019-08-03 00:35:08 +0000
commit5b59773d0ba5b66b78c809ce693cba2460ee1ff5 (patch)
tree71c187b2297a255f3321474082e47d400294bf3d
parent90c461c5366899986996c8947e324d63776431a8 (diff)
downloadpluma-5b59773d0ba5b66b78c809ce693cba2460ee1ff5.tar.bz2
pluma-5b59773d0ba5b66b78c809ce693cba2460ee1ff5.tar.xz
pluma-smart-charset-converter: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-smart-charset-converter.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pluma/pluma-smart-charset-converter.c b/pluma/pluma-smart-charset-converter.c
index f65daae2..2d11f1fd 100644
--- a/pluma/pluma-smart-charset-converter.c
+++ b/pluma/pluma-smart-charset-converter.c
@@ -27,8 +27,6 @@
#include <gio/gio.h>
#include <glib/gi18n.h>
-#define PLUMA_SMART_CHARSET_CONVERTER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), PLUMA_TYPE_SMART_CHARSET_CONVERTER, PlumaSmartCharsetConverterPrivate))
-
struct _PlumaSmartCharsetConverterPrivate
{
GCharsetConverter *charset_conv;
@@ -44,6 +42,7 @@ static void pluma_smart_charset_converter_iface_init (GConverterIface *iface)
G_DEFINE_TYPE_WITH_CODE (PlumaSmartCharsetConverter, pluma_smart_charset_converter,
G_TYPE_OBJECT,
+ G_ADD_PRIVATE (PlumaSmartCharsetConverter)
G_IMPLEMENT_INTERFACE (G_TYPE_CONVERTER,
pluma_smart_charset_converter_iface_init))
@@ -82,14 +81,12 @@ pluma_smart_charset_converter_class_init (PlumaSmartCharsetConverterClass *klass
object_class->finalize = pluma_smart_charset_converter_finalize;
object_class->dispose = pluma_smart_charset_converter_dispose;
-
- g_type_class_add_private (object_class, sizeof (PlumaSmartCharsetConverterPrivate));
}
static void
pluma_smart_charset_converter_init (PlumaSmartCharsetConverter *smart)
{
- smart->priv = PLUMA_SMART_CHARSET_CONVERTER_GET_PRIVATE (smart);
+ smart->priv = pluma_smart_charset_converter_get_instance_private (smart);
smart->priv->charset_conv = NULL;
smart->priv->encodings = NULL;