File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3737
3838wrap_auto_unique_ptr (Exiv2::Image);
3939
40+ #if EXIV2_VERSION_HEX < 0x01000000
4041INPUT_BUFFER_RO (const Exiv2::byte* data, long size)
42+ #else
43+ INPUT_BUFFER_RO (const Exiv2::byte* data, size_t size)
44+ #endif
4145
4246// Potentially blocking calls allow Python threads
4347%thread Exiv2::Image::readMetadata;
@@ -46,13 +50,23 @@ INPUT_BUFFER_RO(const Exiv2::byte* data, long size)
4650%thread Exiv2::ImageFactory::open;
4751
4852// ImageFactory::open(data, size) needs to keep a reference to the buffer.
53+ #if EXIV2_VERSION_HEX < 0x01000000
4954%typemap(ret) Exiv2::Image::AutoPtr open %{
5055 if (PyObject_CheckBuffer (swig_obj[0 ])) {
5156 if (PyObject_SetAttrString ($result, " _refers_to" , swig_obj[0 ])) {
5257 SWIG_fail;
5358 }
5459 }
5560%}
61+ #else
62+ %typemap(ret) Exiv2::Image::UniquePtr open %{
63+ if (PyObject_CheckBuffer (swig_obj[0 ])) {
64+ if (PyObject_SetAttrString ($result, " _refers_to" , swig_obj[0 ])) {
65+ SWIG_fail;
66+ }
67+ }
68+ %}
69+ #endif
5670
5771// exifData(), iptcData(), and xmpData() return values need to keep a
5872// reference to Image.
You can’t perform that action at this time.
0 commit comments