diff options
author | Kyle Auble <kyle.auble@outlook.com> | 2020-11-28 13:42:13 -0500 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2021-02-14 10:56:05 +0000 |
commit | e7fa274dd7c0bd5e66a3b68329d7d56541bb839b (patch) | |
tree | 96d81b037920f2908d0f568bb390db4dfa54f303 | |
parent | db52669444284b8ab00cbb12574496f489b2e093 (diff) |
glib: Add deprecation guards for compiler
-rw-r--r-- | glib/poppler-attachment.h | 10 | ||||
-rw-r--r-- | glib/poppler-document.h | 2 | ||||
-rw-r--r-- | glib/poppler-page.cc | 5 | ||||
-rw-r--r-- | glib/poppler-page.h | 4 |
4 files changed, 13 insertions, 8 deletions
diff --git a/glib/poppler-attachment.h b/glib/poppler-attachment.h index 031c4840..40b7723b 100644 --- a/glib/poppler-attachment.h +++ b/glib/poppler-attachment.h @@ -49,7 +49,6 @@ G_BEGIN_DECLS */ typedef gboolean (*PopplerAttachmentSaveFunc)(const gchar *buf, gsize count, gpointer data, GError **error); -/* GTime is deprecated, but is part of our ABI here (see #715, #765). */ /** * PopplerAttachment: * @name: The filename. Deprecated in poppler 20.09.0. Use @@ -65,7 +64,6 @@ typedef gboolean (*PopplerAttachmentSaveFunc)(const gchar *buf, gsize count, gpo * @checksum: A 16-byte checksum of the file. Deprecated in poppler 20.09.0. Use * poppler_attachment_get_checksum() instead. */ -G_GNUC_BEGIN_IGNORE_DEPRECATIONS struct _PopplerAttachment { GObject parent; @@ -74,11 +72,15 @@ struct _PopplerAttachment gchar *name; gchar *description; gsize size; + + /* GTime is deprecated, but is part of our ABI here (see #715, #765). */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS GTime mtime; GTime ctime; + G_GNUC_END_IGNORE_DEPRECATIONS + GString *checksum; }; -G_GNUC_END_IGNORE_DEPRECATIONS /* This struct was never documented nor intended for external use, but * has technically been part of the API (see #33). */ @@ -93,7 +95,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS typedef struct _PopplerAttachmentClass { GObjectClass parent_class; -} PopplerAttachmentClass; +} PopplerAttachmentClass G_GNUC_DEPRECATED_FOR(PopplerAttachment); POPPLER_PUBLIC GType poppler_attachment_get_type(void) G_GNUC_CONST; diff --git a/glib/poppler-document.h b/glib/poppler-document.h index 5d19b52c..34d78d4c 100644 --- a/glib/poppler-document.h +++ b/glib/poppler-document.h @@ -293,7 +293,7 @@ GType poppler_document_get_type(void) G_GNUC_CONST; POPPLER_PUBLIC PopplerDocument *poppler_document_new_from_file(const char *uri, const char *password, GError **error); POPPLER_PUBLIC -PopplerDocument *poppler_document_new_from_data(char *data, int length, const char *password, GError **error); +PopplerDocument *poppler_document_new_from_data(char *data, int length, const char *password, GError **error) G_GNUC_DEPRECATED_FOR(poppler_document_new_from_bytes); POPPLER_PUBLIC PopplerDocument *poppler_document_new_from_bytes(GBytes *bytes, const char *password, GError **error); POPPLER_PUBLIC diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index 35682d97..7e21c717 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -639,7 +639,10 @@ GList *poppler_page_get_selection_region(PopplerPage *page, gdouble scale, Poppl * * Frees @region * - * Deprecated: 0.16 + * Deprecated: 0.16: Use only to free deprecated regions created by + * poppler_page_get_selection_region(). Regions created by + * poppler_page_get_selected_region() should be freed with + * cairo_region_destroy() instead. */ void poppler_page_selection_region_free(GList *region) { diff --git a/glib/poppler-page.h b/glib/poppler-page.h index 56e9068d..95b0cf9c 100644 --- a/glib/poppler-page.h +++ b/glib/poppler-page.h @@ -72,9 +72,9 @@ char *poppler_page_get_selected_text(PopplerPage *page, PopplerSelectionStyle st POPPLER_PUBLIC cairo_region_t *poppler_page_get_selected_region(PopplerPage *page, gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection); POPPLER_PUBLIC -GList *poppler_page_get_selection_region(PopplerPage *page, gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection); +GList *poppler_page_get_selection_region(PopplerPage *page, gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection) G_GNUC_DEPRECATED_FOR(poppler_page_get_selected_region); POPPLER_PUBLIC -void poppler_page_selection_region_free(GList *region); +void poppler_page_selection_region_free(GList *region) G_GNUC_DEPRECATED_FOR(cairo_region_destroy); POPPLER_PUBLIC GList *poppler_page_get_link_mapping(PopplerPage *page); POPPLER_PUBLIC |