[poppler] 2 commits - cpp/poppler-global.cpp poppler-cpp.pc.cmake poppler-cpp.pc.in

Pino Toscano pino at kemper.freedesktop.org
Tue May 4 06:20:11 PDT 2010


 cpp/poppler-global.cpp |    4 ++--
 poppler-cpp.pc.cmake   |    6 +++++-
 poppler-cpp.pc.in      |    6 +++++-
 3 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit e30d24c506a9ff742f8af5d6c71273abeddaa265
Author: Pino Toscano <pino at kde.org>
Date:   Tue May 4 15:19:26 2010 +0200

    [cpp] ustring::{from,to}_utf8(): fix in/out buffer sizes

diff --git a/cpp/poppler-global.cpp b/cpp/poppler-global.cpp
index bb988a0..96cb321 100644
--- a/cpp/poppler-global.cpp
+++ b/cpp/poppler-global.cpp
@@ -99,7 +99,7 @@ byte_array ustring::to_utf8() const
     const value_type *me_data = data();
     byte_array str(size());
     char *str_data = &str[0];
-    size_t me_len_char = size() * 2;
+    size_t me_len_char = size();
     size_t str_len_left = str.size();
     size_t ir = iconv(ic, (ICONV_CONST char **)&me_data, &me_len_char, &str_data, &str_len_left);
     if ((ir == (size_t)-1) && (errno == E2BIG)) {
@@ -147,7 +147,7 @@ ustring ustring::from_utf8(const char *str, int len)
         return ustring();
     }
 
-    ustring ret(len, 0);
+    ustring ret(len * 2, 0);
     char *ret_data = reinterpret_cast<char *>(&ret[0]);
     char *str_data = const_cast<char *>(str);
     size_t str_len_char = len;
commit aaa19a673020e12dbfceb4d25ade0ece7875fd83
Author: Pino Toscano <pino at kde.org>
Date:   Tue May 4 12:07:43 2010 +0200

    [cpp] make the pkg-config files really working

diff --git a/poppler-cpp.pc.cmake b/poppler-cpp.pc.cmake
index eeb11cc..3f56b3d 100644
--- a/poppler-cpp.pc.cmake
+++ b/poppler-cpp.pc.cmake
@@ -6,4 +6,8 @@ includedir=${prefix}/include
 Name: poppler-cpp
 Description: cpp backend for Poppler PDF rendering library
 Version: @POPPLER_VERSION@
-Requires: poppler = @POPPLER_VERSION@
+Requires: @PC_REQUIRES@
+ at PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-cpp
+Cflags: -I${includedir}/poppler/cpp
diff --git a/poppler-cpp.pc.in b/poppler-cpp.pc.in
index 309f070..a7e97c2 100644
--- a/poppler-cpp.pc.in
+++ b/poppler-cpp.pc.in
@@ -6,4 +6,8 @@ includedir=@includedir@
 Name: poppler-cpp
 Description: cpp backend for Poppler PDF rendering library
 Version: @VERSION@
-Requires: poppler = @VERSION@
+Requires: @PC_REQUIRES@
+ at PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-cpp
+Cflags: -I${includedir}/poppler/cpp


More information about the poppler mailing list