diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/poppler-hack.cc | 9 |
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 { |
