Skip to content

Commit be2f408

Browse files
committed
Update for latest SWIG
1 parent 8a0af91 commit be2f408

File tree

6 files changed

+133
-71
lines changed

6 files changed

+133
-71
lines changed

src/flc_vector.i

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
%include <std_vector.i>
1212

1313
/* ------------------------------------------------------------------------- */
14-
%define EXTEND_STD_VECTOR_POD_INTERNAL(CTYPE)
14+
%define EXTEND_STD_VECTOR_POD(CTYPE)
1515
%apply (const SWIGTYPE *DATA, ::size_t SIZE)
1616
{ (const CTYPE* DATA, size_type SIZE) };
1717

@@ -50,9 +50,10 @@
5050
%define %specialize_std_vector_pod(T)
5151
namespace std {
5252
template<> class vector<T> {
53-
SWIG_STD_VECTOR_MINIMUM_INTERNAL(T, const T&)
53+
SWIG_STD_VECTOR_COMMON(T, const T&)
54+
SWIG_STD_VECTOR_REF(T)
5455
%extend {
55-
EXTEND_STD_VECTOR_POD_INTERNAL(T)
56+
EXTEND_STD_VECTOR_POD(T)
5657
}
5758
};
5859
}

src/generated/flcFORTRAN_wrap.cxx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,6 @@ template <typename T> T SwigValueInit() {
171171
# pragma warning disable 592
172172
#endif
173173

174-
/* Errors in SWIG */
175-
#define SWIG_UnknownError -1
176-
#define SWIG_IOError -2
177-
#define SWIG_RuntimeError -3
178-
#define SWIG_IndexError -4
179-
#define SWIG_TypeError -5
180-
#define SWIG_DivisionByZero -6
181-
#define SWIG_OverflowError -7
182-
#define SWIG_SyntaxError -8
183-
#define SWIG_ValueError -9
184-
#define SWIG_SystemError -10
185-
#define SWIG_AttributeError -11
186-
#define SWIG_MemoryError -12
187-
#define SWIG_NullReferenceError -13
188-
189-
190-
191174

192175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
193176
{ throw std::logic_error("In " DECL ": " MSG); }

src/generated/flc_algorithmFORTRAN_wrap.cxx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,6 @@ template <typename T> T SwigValueInit() {
171171
# pragma warning disable 592
172172
#endif
173173

174-
/* Errors in SWIG */
175-
#define SWIG_UnknownError -1
176-
#define SWIG_IOError -2
177-
#define SWIG_RuntimeError -3
178-
#define SWIG_IndexError -4
179-
#define SWIG_TypeError -5
180-
#define SWIG_DivisionByZero -6
181-
#define SWIG_OverflowError -7
182-
#define SWIG_SyntaxError -8
183-
#define SWIG_ValueError -9
184-
#define SWIG_SystemError -10
185-
#define SWIG_AttributeError -11
186-
#define SWIG_MemoryError -12
187-
#define SWIG_NullReferenceError -13
188-
189-
190-
191174

192175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
193176
{ throw std::logic_error("In " DECL ": " MSG); }
@@ -207,6 +190,23 @@ void SWIG_store_exception(const char* decl, int errcode, const char *msg);
207190
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
208191
SWIG_store_exception(DECL, CODE, MSG); RETURNNULL;
209192

193+
/* Errors in SWIG */
194+
#define SWIG_UnknownError -1
195+
#define SWIG_IOError -2
196+
#define SWIG_RuntimeError -3
197+
#define SWIG_IndexError -4
198+
#define SWIG_TypeError -5
199+
#define SWIG_DivisionByZero -6
200+
#define SWIG_OverflowError -7
201+
#define SWIG_SyntaxError -8
202+
#define SWIG_ValueError -9
203+
#define SWIG_SystemError -10
204+
#define SWIG_AttributeError -11
205+
#define SWIG_MemoryError -12
206+
#define SWIG_NullReferenceError -13
207+
208+
209+
210210

211211
enum SwigMemFlags {
212212
SWIG_MEM_OWN = 0x01,

src/generated/flc_randomFORTRAN_wrap.cxx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,6 @@ template <typename T> T SwigValueInit() {
171171
# pragma warning disable 592
172172
#endif
173173

174-
/* Errors in SWIG */
175-
#define SWIG_UnknownError -1
176-
#define SWIG_IOError -2
177-
#define SWIG_RuntimeError -3
178-
#define SWIG_IndexError -4
179-
#define SWIG_TypeError -5
180-
#define SWIG_DivisionByZero -6
181-
#define SWIG_OverflowError -7
182-
#define SWIG_SyntaxError -8
183-
#define SWIG_ValueError -9
184-
#define SWIG_SystemError -10
185-
#define SWIG_AttributeError -11
186-
#define SWIG_MemoryError -12
187-
#define SWIG_NullReferenceError -13
188-
189-
190-
191174

192175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
193176
{ throw std::logic_error("In " DECL ": " MSG); }
@@ -207,6 +190,23 @@ void SWIG_store_exception(const char* decl, int errcode, const char *msg);
207190
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
208191
SWIG_store_exception(DECL, CODE, MSG); RETURNNULL;
209192

193+
/* Errors in SWIG */
194+
#define SWIG_UnknownError -1
195+
#define SWIG_IOError -2
196+
#define SWIG_RuntimeError -3
197+
#define SWIG_IndexError -4
198+
#define SWIG_TypeError -5
199+
#define SWIG_DivisionByZero -6
200+
#define SWIG_OverflowError -7
201+
#define SWIG_SyntaxError -8
202+
#define SWIG_ValueError -9
203+
#define SWIG_SystemError -10
204+
#define SWIG_AttributeError -11
205+
#define SWIG_MemoryError -12
206+
#define SWIG_NullReferenceError -13
207+
208+
209+
210210

211211
enum SwigMemFlags {
212212
SWIG_MEM_OWN = 0x01,

src/generated/flc_vector.f90

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module flc_vector
3939
procedure, private :: swigf_VectorInt4_resize__SWIG_0
4040
procedure, private :: swigf_VectorInt4_resize__SWIG_1
4141
procedure :: push_back => swigf_VectorInt4_push_back
42+
procedure :: pop_back => swigf_VectorInt4_pop_back
4243
procedure :: clear => swigf_VectorInt4_clear
4344
procedure :: set => swigf_VectorInt4_set
4445
procedure :: get => swigf_VectorInt4_get
@@ -73,6 +74,7 @@ module flc_vector
7374
procedure, private :: swigf_VectorInt8_resize__SWIG_0
7475
procedure, private :: swigf_VectorInt8_resize__SWIG_1
7576
procedure :: push_back => swigf_VectorInt8_push_back
77+
procedure :: pop_back => swigf_VectorInt8_pop_back
7678
procedure :: clear => swigf_VectorInt8_clear
7779
procedure :: set => swigf_VectorInt8_set
7880
procedure :: get => swigf_VectorInt8_get
@@ -107,6 +109,7 @@ module flc_vector
107109
procedure, private :: swigf_VectorReal8_resize__SWIG_0
108110
procedure, private :: swigf_VectorReal8_resize__SWIG_1
109111
procedure :: push_back => swigf_VectorReal8_push_back
112+
procedure :: pop_back => swigf_VectorReal8_pop_back
110113
procedure :: clear => swigf_VectorReal8_clear
111114
procedure :: set => swigf_VectorReal8_set
112115
procedure :: get => swigf_VectorReal8_get
@@ -245,6 +248,13 @@ subroutine swigc_VectorInt4_push_back(farg1, farg2) &
245248
integer(C_INT32_T), intent(in) :: farg2
246249
end subroutine
247250

251+
subroutine swigc_VectorInt4_pop_back(farg1) &
252+
bind(C, name="_wrap_VectorInt4_pop_back")
253+
use, intrinsic :: ISO_C_BINDING
254+
import :: swigclasswrapper
255+
type(SwigClassWrapper) :: farg1
256+
end subroutine
257+
248258
subroutine swigc_VectorInt4_clear(farg1) &
249259
bind(C, name="_wrap_VectorInt4_clear")
250260
use, intrinsic :: ISO_C_BINDING
@@ -455,6 +465,13 @@ subroutine swigc_VectorInt8_push_back(farg1, farg2) &
455465
integer(C_INT64_T), intent(in) :: farg2
456466
end subroutine
457467

468+
subroutine swigc_VectorInt8_pop_back(farg1) &
469+
bind(C, name="_wrap_VectorInt8_pop_back")
470+
use, intrinsic :: ISO_C_BINDING
471+
import :: swigclasswrapper
472+
type(SwigClassWrapper) :: farg1
473+
end subroutine
474+
458475
subroutine swigc_VectorInt8_clear(farg1) &
459476
bind(C, name="_wrap_VectorInt8_clear")
460477
use, intrinsic :: ISO_C_BINDING
@@ -665,6 +682,13 @@ subroutine swigc_VectorReal8_push_back(farg1, farg2) &
665682
real(C_DOUBLE), intent(in) :: farg2
666683
end subroutine
667684

685+
subroutine swigc_VectorReal8_pop_back(farg1) &
686+
bind(C, name="_wrap_VectorReal8_pop_back")
687+
use, intrinsic :: ISO_C_BINDING
688+
import :: swigclasswrapper
689+
type(SwigClassWrapper) :: farg1
690+
end subroutine
691+
668692
subroutine swigc_VectorReal8_clear(farg1) &
669693
bind(C, name="_wrap_VectorReal8_clear")
670694
use, intrinsic :: ISO_C_BINDING
@@ -947,6 +971,15 @@ subroutine swigf_VectorInt4_push_back(self, v)
947971
call swigc_VectorInt4_push_back(farg1, farg2)
948972
end subroutine
949973

974+
subroutine swigf_VectorInt4_pop_back(self)
975+
use, intrinsic :: ISO_C_BINDING
976+
class(VectorInt4), intent(in) :: self
977+
type(SwigClassWrapper) :: farg1
978+
979+
farg1 = self%swigdata
980+
call swigc_VectorInt4_pop_back(farg1)
981+
end subroutine
982+
950983
subroutine swigf_VectorInt4_clear(self)
951984
use, intrinsic :: ISO_C_BINDING
952985
class(VectorInt4), intent(in) :: self
@@ -1288,6 +1321,15 @@ subroutine swigf_VectorInt8_push_back(self, v)
12881321
call swigc_VectorInt8_push_back(farg1, farg2)
12891322
end subroutine
12901323

1324+
subroutine swigf_VectorInt8_pop_back(self)
1325+
use, intrinsic :: ISO_C_BINDING
1326+
class(VectorInt8), intent(in) :: self
1327+
type(SwigClassWrapper) :: farg1
1328+
1329+
farg1 = self%swigdata
1330+
call swigc_VectorInt8_pop_back(farg1)
1331+
end subroutine
1332+
12911333
subroutine swigf_VectorInt8_clear(self)
12921334
use, intrinsic :: ISO_C_BINDING
12931335
class(VectorInt8), intent(in) :: self
@@ -1629,6 +1671,15 @@ subroutine swigf_VectorReal8_push_back(self, v)
16291671
call swigc_VectorReal8_push_back(farg1, farg2)
16301672
end subroutine
16311673

1674+
subroutine swigf_VectorReal8_pop_back(self)
1675+
use, intrinsic :: ISO_C_BINDING
1676+
class(VectorReal8), intent(in) :: self
1677+
type(SwigClassWrapper) :: farg1
1678+
1679+
farg1 = self%swigdata
1680+
call swigc_VectorReal8_pop_back(farg1)
1681+
end subroutine
1682+
16321683
subroutine swigf_VectorReal8_clear(self)
16331684
use, intrinsic :: ISO_C_BINDING
16341685
class(VectorReal8), intent(in) :: self

src/generated/flc_vectorFORTRAN_wrap.cxx

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,6 @@ template <typename T> T SwigValueInit() {
171171
# pragma warning disable 592
172172
#endif
173173

174-
/* Errors in SWIG */
175-
#define SWIG_UnknownError -1
176-
#define SWIG_IOError -2
177-
#define SWIG_RuntimeError -3
178-
#define SWIG_IndexError -4
179-
#define SWIG_TypeError -5
180-
#define SWIG_DivisionByZero -6
181-
#define SWIG_OverflowError -7
182-
#define SWIG_SyntaxError -8
183-
#define SWIG_ValueError -9
184-
#define SWIG_SystemError -10
185-
#define SWIG_AttributeError -11
186-
#define SWIG_MemoryError -12
187-
#define SWIG_NullReferenceError -13
188-
189-
190-
191174

192175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
193176
{ throw std::logic_error("In " DECL ": " MSG); }
@@ -207,6 +190,23 @@ void SWIG_store_exception(const char* decl, int errcode, const char *msg);
207190
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
208191
SWIG_store_exception(DECL, CODE, MSG); RETURNNULL;
209192

193+
/* Errors in SWIG */
194+
#define SWIG_UnknownError -1
195+
#define SWIG_IOError -2
196+
#define SWIG_RuntimeError -3
197+
#define SWIG_IndexError -4
198+
#define SWIG_TypeError -5
199+
#define SWIG_DivisionByZero -6
200+
#define SWIG_OverflowError -7
201+
#define SWIG_SyntaxError -8
202+
#define SWIG_ValueError -9
203+
#define SWIG_SystemError -10
204+
#define SWIG_AttributeError -11
205+
#define SWIG_MemoryError -12
206+
#define SWIG_NullReferenceError -13
207+
208+
209+
210210

211211
enum SwigMemFlags {
212212
SWIG_MEM_OWN = 0x01,
@@ -704,6 +704,15 @@ SWIGEXPORT void _wrap_VectorInt4_push_back(SwigClassWrapper *farg1, int32_t cons
704704
}
705705

706706

707+
SWIGEXPORT void _wrap_VectorInt4_pop_back(SwigClassWrapper *farg1) {
708+
std::vector< int32_t > *arg1 = (std::vector< int32_t > *) 0 ;
709+
710+
SWIG_check_nonnull(*farg1, "std::vector< int32_t > *", "VectorInt4", "std::vector< int32_t >::pop_back()", return );
711+
arg1 = (std::vector< int32_t > *)farg1->cptr;
712+
(arg1)->pop_back();
713+
}
714+
715+
707716
SWIGEXPORT void _wrap_VectorInt4_clear(SwigClassWrapper *farg1) {
708717
std::vector< int32_t > *arg1 = (std::vector< int32_t > *) 0 ;
709718

@@ -1013,6 +1022,15 @@ SWIGEXPORT void _wrap_VectorInt8_push_back(SwigClassWrapper *farg1, int64_t cons
10131022
}
10141023

10151024

1025+
SWIGEXPORT void _wrap_VectorInt8_pop_back(SwigClassWrapper *farg1) {
1026+
std::vector< int64_t > *arg1 = (std::vector< int64_t > *) 0 ;
1027+
1028+
SWIG_check_nonnull(*farg1, "std::vector< int64_t > *", "VectorInt8", "std::vector< int64_t >::pop_back()", return );
1029+
arg1 = (std::vector< int64_t > *)farg1->cptr;
1030+
(arg1)->pop_back();
1031+
}
1032+
1033+
10161034
SWIGEXPORT void _wrap_VectorInt8_clear(SwigClassWrapper *farg1) {
10171035
std::vector< int64_t > *arg1 = (std::vector< int64_t > *) 0 ;
10181036

@@ -1322,6 +1340,15 @@ SWIGEXPORT void _wrap_VectorReal8_push_back(SwigClassWrapper *farg1, double cons
13221340
}
13231341

13241342

1343+
SWIGEXPORT void _wrap_VectorReal8_pop_back(SwigClassWrapper *farg1) {
1344+
std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1345+
1346+
SWIG_check_nonnull(*farg1, "std::vector< double > *", "VectorReal8", "std::vector< double >::pop_back()", return );
1347+
arg1 = (std::vector< double > *)farg1->cptr;
1348+
(arg1)->pop_back();
1349+
}
1350+
1351+
13251352
SWIGEXPORT void _wrap_VectorReal8_clear(SwigClassWrapper *farg1) {
13261353
std::vector< double > *arg1 = (std::vector< double > *) 0 ;
13271354

0 commit comments

Comments
 (0)