Skip to content

Commit a910c66

Browse files
Remove stuff needed for old SWIG versions
1 parent 6d331e6 commit a910c66

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

src/interface/shared/unique_ptr.i

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// python-exiv2 - Python interface to libexiv2
22
// http://github.com/jim-easterbrook/python-exiv2
3-
// Copyright (C) 2023-24 Jim Easterbrook jim@jim-easterbrook.me.uk
3+
// Copyright (C) 2023-25 Jim Easterbrook jim@jim-easterbrook.me.uk
44
//
55
// This program is free software: you can redistribute it and/or modify
66
// it under the terms of the GNU General Public License as published by
@@ -25,24 +25,12 @@
2525
%typemap(doctype) pointed_type##::AutoPtr #pointed_type
2626
%auto_ptr(pointed_type)
2727
%enddef // UNIQUE_PTR
28-
#else
28+
#else // EXIV2_VERSION_HEX
2929
#define SMART_PTR UniquePtr
3030
%ignore UniquePtr;
31-
#if SWIG_VERSION >= 0x040100
3231
%define UNIQUE_PTR(pointed_type)
3332
%include "std_unique_ptr.i"
3433
%typemap(doctype) pointed_type##::UniquePtr #pointed_type
3534
%unique_ptr(pointed_type)
3635
%enddef // UNIQUE_PTR
37-
#else
38-
template <typename T>
39-
struct std::unique_ptr {};
40-
%define UNIQUE_PTR(pointed_type)
41-
%typemap(out) std::unique_ptr<pointed_type> %{
42-
$result = SWIG_NewPointerObj(
43-
$1.release(), $descriptor(pointed_type *), SWIG_POINTER_OWN);
44-
%}
45-
%template() std::unique_ptr<pointed_type>;
46-
%enddef // UNIQUE_PTR
47-
#endif
48-
#endif
36+
#endif // EXIV2_VERSION_HEX

0 commit comments

Comments
 (0)