summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2018-12-14 20:13:25 +0100
committerAndreas Politz <politza@hochschule-trier.de>2018-12-14 20:13:25 +0100
commitc41694fb198e644b3da03917e6792c71cf0c81dc (patch)
tree6f4e0c3e71b1855be38076797d3edecdfd084ff8
parent8fce453df8714aaf94a7ac56a3850ed3751ceae2 (diff)
parentbd81a2b7c75ffeaa6cb980bab5769e749b3ae3fe (diff)
Merge branch 'master' of github.com:politza/pdf-tools
-rw-r--r--server/poppler-hack.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc
index 427f9df..2451101 100644
--- a/server/poppler-hack.cc
+++ b/server/poppler-hack.cc
@@ -18,6 +18,7 @@
#include <Annot.h>
#include <glib.h>
#include <glib-object.h>
+#include <poppler-features.h>
extern "C"
{
@@ -32,6 +33,12 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ANNOT_MARKUP))
#define POPPLER_TYPE_ANNOT_MARKUP (poppler_annot_markup_get_type ())
+#if POPPLER_CHECK_VERSION(0,72,0)
+#define GET_CSTR c_str
+#else
+#define GET_CSTR getCString
+#endif
+
struct PopplerAnnot
{
GObject parent_instance;
@@ -62,7 +69,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
return NULL;
if (s->hasUnicodeMarker()) {
- result = g_convert (s->getCString () + 2,
+ result = g_convert (s->GET_CSTR () + 2,
s->getLength () - 2,
"UTF-8", "UTF-16BE", NULL, NULL, NULL);
} else {