Bug 93229

Summary: remove or deprecate PopplerOrientation
Product: poppler Reporter: Hib Eris <hib>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: hib, teuf
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [glib] Remove enum PopplerOrientation from API
[glib] Deprecate PopplerOrientation

Description Hib Eris 2015-12-03 15:29:34 UTC
While reading Poppler's glib documentation, I noticed that the enum PopplerOrientation is part of the glib API, but has no function at all.

Digging deeper, I found that this enum should have been removed long time ago with 1aad886c6c19a964a3fc9e18f31acc8e115478e0 . In fact, PopplerOrientation has never been a useful part of the API of a released poppler version.

Thus, I would like to propose to remove it from the API.

Alternatively, in case you want to keep it anyway in order to not break this (useless and unused) API, I would suggest to mark the enum as deprecated.

I will attach patches to do either.
Comment 1 Hib Eris 2015-12-03 15:31:40 UTC
Created attachment 120303 [details] [review]
[glib] Remove enum PopplerOrientation from API

This should have been removed long time ago with 1aad886c6c19a964a3fc9e18f31acc8e115478e0
Comment 2 Hib Eris 2015-12-03 15:33:33 UTC
Created attachment 120304 [details] [review]
[glib] Deprecate PopplerOrientation

This should have been removed long time ago with 1aad886c6c19a964a3fc9e18f31acc8e115478e0
Comment 3 Carlos Garcia Campos 2015-12-03 15:39:10 UTC
Let's remove it then, it's not actually an api break since it's unused. Thanks
Comment 4 Christophe Fergeau 2016-04-28 08:51:43 UTC
This unfortunately breaks both ABI and API for pypoppler. PopplerOrientation was defined in poppler.h, which is passed to glib-mkenums in order to generate the public header poppler-enums.h, and the diff for this header before/after this commit is:

--- poppler-enums.h     2016-04-28 10:46:57.709931818 +0200
+++ glib/poppler-enums.h        2016-04-28 10:46:58.790928198 +0200
@@ -92,6 +92,8 @@
 /* enumerations from "poppler.h" */
 GType poppler_error_get_type (void) G_GNUC_CONST;
 #define POPPLER_TYPE_ERROR (poppler_error_get_type ())
+GType poppler_orientation_get_type (void) G_GNUC_CONST;
+#define POPPLER_TYPE_ORIENTATION (poppler_orientation_get_type ())
 GType poppler_page_transition_type_get_type (void) G_GNUC_CONST;
 #define POPPLER_TYPE_PAGE_TRANSITION_TYPE (poppler_page_transition_type_get_type ())
 GType poppler_page_transition_alignment_get_type (void) G_GNUC_CONST;


ABI break is https://bugzilla.redhat.com/show_bug.cgi?id=1323497
$pdfshuffler 

Error: Could not import pdfshuffler
Cause: /usr/lib64/python2.7/site-packages/poppler.so: undefined symbol: poppler_orientation_get_type



API break is https://bugzilla.redhat.com/show_bug.cgi?id=1307888

poppler.c: In function 'py_poppler_add_constants':
poppler.c:4628:53: error: 'POPPLER_TYPE_ORIENTATION' undeclared (first use in this function)
   pyg_enum_add(module, "Orientation", strip_prefix, POPPLER_TYPE_ORIENTATION);
poppler.c:4628:53: note: each undeclared identifier is reported only once for each function it appears in
Makefile:430: recipe for target 'poppler_la-poppler.lo' failed


I'll look at patching pypoppler, but these changes on poppler-glib side were unexpected ;)
Comment 5 GitLab Migration User 2018-08-20 21:48:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/80.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.