summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-14 13:09:51 +0200
committerlukefromdc <[email protected]>2019-07-16 00:16:07 +0000
commitd0c91971a50fcfa7a2c2f7c18a357191fc76216b (patch)
tree2d811745933f49d9e332d8e70f9fe673ec9d8c7f
parent687362e6f47490314ba7a93c1ded37bb40830ea6 (diff)
downloadpluma-d0c91971a50fcfa7a2c2f7c18a357191fc76216b.tar.bz2
pluma-d0c91971a50fcfa7a2c2f7c18a357191fc76216b.tar.xz
pluma-document-output-stream: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-document-output-stream.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pluma/pluma-document-output-stream.c b/pluma/pluma-document-output-stream.c
index 6fe662c0..9ccdb742 100644
--- a/pluma/pluma-document-output-stream.c
+++ b/pluma/pluma-document-output-stream.c
@@ -34,10 +34,6 @@
* there is no I/O involved and should be accessed only by the main
* thread */
-#define PLUMA_DOCUMENT_OUTPUT_STREAM_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object),\
- PLUMA_TYPE_DOCUMENT_OUTPUT_STREAM,\
- PlumaDocumentOutputStreamPrivate))
-
#define MAX_UNICHAR_LEN 6
struct _PlumaDocumentOutputStreamPrivate
@@ -58,7 +54,7 @@ enum
PROP_DOCUMENT
};
-G_DEFINE_TYPE (PlumaDocumentOutputStream, pluma_document_output_stream, G_TYPE_OUTPUT_STREAM)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaDocumentOutputStream, pluma_document_output_stream, G_TYPE_OUTPUT_STREAM)
static gssize pluma_document_output_stream_write (GOutputStream *stream,
const void *buffer,
@@ -169,14 +165,12 @@ pluma_document_output_stream_class_init (PlumaDocumentOutputStreamClass *klass)
PLUMA_TYPE_DOCUMENT,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private (object_class, sizeof (PlumaDocumentOutputStreamPrivate));
}
static void
pluma_document_output_stream_init (PlumaDocumentOutputStream *stream)
{
- stream->priv = PLUMA_DOCUMENT_OUTPUT_STREAM_GET_PRIVATE (stream);
+ stream->priv = pluma_document_output_stream_get_instance_private (stream);
stream->priv->buffer = NULL;
stream->priv->buflen = 0;