diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-11-15 16:42:21 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-11-15 16:42:21 +0100 |
commit | 189c45332991bce51e40bcaf65da67d2d644045a (patch) | |
tree | cff1974bc13e6a45d07340578953c49d8f98f146 /glib/poppler-attachment.cc | |
parent | e55bfeb1ddc60053c5ee5fef840c409891781ce6 (diff) |
[glib] Remove PopplerDocument from PopplerAttachment
Since we are duplicating the stream we don't need to hold a reference of
PopplerDocument anymore.
Diffstat (limited to 'glib/poppler-attachment.cc')
-rw-r--r-- | glib/poppler-attachment.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc index 78bc72f6..6a098e12 100644 --- a/glib/poppler-attachment.cc +++ b/glib/poppler-attachment.cc @@ -30,7 +30,6 @@ typedef struct _PopplerAttachmentPrivate PopplerAttachmentPrivate; struct _PopplerAttachmentPrivate { Object *obj_stream; - PopplerDocument *document; }; #define POPPLER_ATTACHMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachmentPrivate)) @@ -67,12 +66,6 @@ poppler_attachment_dispose (GObject *obj) priv->obj_stream = NULL; } - if (priv->document) - { - g_object_unref (priv->document); - priv->document = NULL; - } - G_OBJECT_CLASS (poppler_attachment_parent_class)->dispose (obj); } @@ -101,20 +94,16 @@ poppler_attachment_finalize (GObject *obj) /* Public functions */ PopplerAttachment * -_poppler_attachment_new (PopplerDocument *document, - EmbFile *emb_file) +_poppler_attachment_new (EmbFile *emb_file) { PopplerAttachment *attachment; PopplerAttachmentPrivate *priv; - g_assert (document != NULL); g_assert (emb_file != NULL); attachment = (PopplerAttachment *) g_object_new (POPPLER_TYPE_ATTACHMENT, NULL); priv = POPPLER_ATTACHMENT_GET_PRIVATE (attachment); - priv->document = (PopplerDocument *) g_object_ref (document); - if (emb_file->name ()) attachment->name = _poppler_goo_string_to_utf8 (emb_file->name ()); if (emb_file->description ()) |