[gexiv2] Fix building GIO wrapper against exiv2 master
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gexiv2] Fix building GIO wrapper against exiv2 master
- Date: Wed, 2 Jan 2019 10:04:17 +0000 (UTC)
commit 67d5a119fd6d33802b0c966f41cf2257e0b6df6c
Author: Jens Georg <mail jensge org>
Date: Wed Jan 2 11:03:12 2019 +0100
Fix building GIO wrapper against exiv2 master
gexiv2/gexiv2-metadata.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/gexiv2/gexiv2-metadata.cpp b/gexiv2/gexiv2-metadata.cpp
index a3257ee..c520ede 100644
--- a/gexiv2/gexiv2-metadata.cpp
+++ b/gexiv2/gexiv2-metadata.cpp
@@ -49,6 +49,12 @@ public:
typedef long seek_offset_t;
#endif
+#if EXIV2_TEST_VERSION(0,27,99)
+ using ptr_type = Exiv2::BasicIo::UniquePtr;
+#else
+ using ptr_type = Exiv2::BasicIo::AutoPtr;
+#endif
+
int open() {
return 0;
}
@@ -392,8 +398,12 @@ gboolean gexiv2_metadata_from_stream(GExiv2Metadata *self, GInputStream *stream,
g_return_val_if_fail (GEXIV2_IS_METADATA (self), FALSE);
try {
- Exiv2::BasicIo::AutoPtr gio_ptr (new GioIo (stream));
+ GioIo::ptr_type gio_ptr{new GioIo (stream)};
+#if EXIV2_TEST_VERSION(0,27,99)
+ self->priv->image = Exiv2::ImageFactory::open (std::move(gio_ptr));
+#else
self->priv->image = Exiv2::ImageFactory::open (gio_ptr);
+#endif
return gexiv2_metadata_open_internal (self, error);
} catch (Exiv2::Error &e) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]