diff options
author | Pablo Barciela <[email protected]> | 2019-07-15 20:22:45 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-07-15 20:17:02 -0400 |
commit | 7841131803aa8a4efb66ad291cf57505f309dc89 (patch) | |
tree | 234a245e7617eccf2dab0923a3d0061b2759acbd | |
parent | d0c91971a50fcfa7a2c2f7c18a357191fc76216b (diff) | |
download | pluma-7841131803aa8a4efb66ad291cf57505f309dc89.tar.bz2 pluma-7841131803aa8a4efb66ad291cf57505f309dc89.tar.xz |
pluma-gio-document-loader: avoid 'g_type_class_add_private'
-rw-r--r-- | pluma/pluma-gio-document-loader.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/pluma/pluma-gio-document-loader.c b/pluma/pluma-gio-document-loader.c index 761fba2f..24c065b4 100644 --- a/pluma/pluma-gio-document-loader.c +++ b/pluma/pluma-gio-document-loader.c @@ -66,11 +66,6 @@ typedef struct G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "," \ PLUMA_METADATA_ATTRIBUTE_ENCODING -#define PLUMA_GIO_DOCUMENT_LOADER_GET_PRIVATE(object) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((object), \ - PLUMA_TYPE_GIO_DOCUMENT_LOADER, \ - PlumaGioDocumentLoaderPrivate)) - static void pluma_gio_document_loader_load (PlumaDocumentLoader *loader); static gboolean pluma_gio_document_loader_cancel (PlumaDocumentLoader *loader); static goffset pluma_gio_document_loader_get_bytes_read (PlumaDocumentLoader *loader); @@ -95,7 +90,7 @@ struct _PlumaGioDocumentLoaderPrivate GError *error; }; -G_DEFINE_TYPE(PlumaGioDocumentLoader, pluma_gio_document_loader, PLUMA_TYPE_DOCUMENT_LOADER) +G_DEFINE_TYPE_WITH_PRIVATE (PlumaGioDocumentLoader, pluma_gio_document_loader, PLUMA_TYPE_DOCUMENT_LOADER) static void pluma_gio_document_loader_dispose (GObject *object) @@ -155,14 +150,12 @@ pluma_gio_document_loader_class_init (PlumaGioDocumentLoaderClass *klass) loader_class->load = pluma_gio_document_loader_load; loader_class->cancel = pluma_gio_document_loader_cancel; loader_class->get_bytes_read = pluma_gio_document_loader_get_bytes_read; - - g_type_class_add_private (object_class, sizeof(PlumaGioDocumentLoaderPrivate)); } static void pluma_gio_document_loader_init (PlumaGioDocumentLoader *gvloader) { - gvloader->priv = PLUMA_GIO_DOCUMENT_LOADER_GET_PRIVATE (gvloader); + gvloader->priv = pluma_gio_document_loader_get_instance_private (gvloader); gvloader->priv->converter = NULL; gvloader->priv->error = NULL; |