diff options
| author | politza <politza@fh-trier.de> | 2018-12-11 06:07:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-11 06:07:15 +0100 |
| commit | bd81a2b7c75ffeaa6cb980bab5769e749b3ae3fe (patch) | |
| tree | 1736450aa89f4e1fffd82f76d49ffd2b24842caa | |
| parent | 9e765939ee42d59ba0280e52a2ce70f41c61f71e (diff) | |
| parent | 581b65f5babb5462f287521d13824ac803ab1fa3 (diff) | |
Merge pull request #448 from justbur/getCString
Update name of GooString::getCString to GooString::c_str
| -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 { |
