diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ev-document-info.h | 12 | ||||
-rw-r--r-- | backend/ev-document.c | 15 |
2 files changed, 22 insertions, 5 deletions
diff --git a/backend/ev-document-info.h b/backend/ev-document-info.h index 85965da..15d27d0 100644 --- a/backend/ev-document-info.h +++ b/backend/ev-document-info.h @@ -75,11 +75,11 @@ typedef enum struct _EvDocumentInfo { - const char *title; - const char *format; /* eg, "pdf-1.5" */ - const char *author; - const char *subject; - const char *keywords; + char *title; + char *format; /* eg, "pdf-1.5" */ + char *author; + char *subject; + char *keywords; EvDocumentLayout layout; EvDocumentMode mode; GDate creation_date; @@ -89,6 +89,8 @@ struct _EvDocumentInfo guint fields_mask; }; +void ev_document_info_free (EvDocumentInfo *info); + G_END_DECLS #endif /* EV_DOCUMENT_INFO_H */ diff --git a/backend/ev-document.c b/backend/ev-document.c index 1b2f778..714becb 100644 --- a/backend/ev-document.c +++ b/backend/ev-document.c @@ -240,3 +240,18 @@ ev_document_render_pixbuf (EvDocument *document, return retval; } + +void +ev_document_info_free (EvDocumentInfo *info) +{ + if (info == NULL) + return; + + g_free (info->title); + g_free (info->format); + g_free (info->author); + g_free (info->subject); + g_free (info->keywords); + + g_free (info); +} |