From 581b65f5babb5462f287521d13824ac803ab1fa3 Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Sun, 9 Dec 2018 22:56:01 -0500 Subject: Update name of GooString::getCString to GooString::c_str See upstream poppler commit: https://cgit.freedesktop.org/poppler/poppler/commit/goo/GooString.h?id=817b0f12453985c416a0388cdd4a09697d092b7f --- server/poppler-hack.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 #include #include +#include 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 { -- cgit v1.0