Skip to content

Commit 169b584

Browse files
committed
Regenerate with SWIG 4.1.0+fortran
1 parent 338e9ce commit 169b584

14 files changed

+698
-593
lines changed

src/flc.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
! This file was automatically generated by SWIG (http://www.swig.org).
1+
! This file was automatically generated by SWIG (https://www.swig.org).
22
! Version 4.1.0+fortran
33
!
4-
! Do not make changes to this file unless you know what you are doing--modify
4+
! Do not make changes to this file unless you know what you are doing - modify
55
! the SWIG interface file instead.
66

77
! Flibcpp project, https://github.com/swig-fortran/flibcpp

src/flcFORTRAN_wrap.cxx

Lines changed: 58 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
/* ----------------------------------------------------------------------------
2-
* This file was automatically generated by SWIG (http://www.swig.org).
2+
* This file was automatically generated by SWIG (https://www.swig.org).
33
* Version 4.1.0+fortran
44
*
5-
* This file is not intended to be easily readable and contains a number of
6-
* coding conventions designed to improve portability and efficiency. Do not make
7-
* changes to this file unless you know what you are doing--modify the SWIG
8-
* interface file instead.
5+
* Do not make changes to this file unless you know what you are doing - modify
6+
* the SWIG interface file instead.
97
* ----------------------------------------------------------------------------- */
108

119
/*
@@ -14,36 +12,6 @@
1412
* Distributed under an MIT open source license: see LICENSE for details.
1513
*/
1614

17-
18-
19-
#ifndef SWIGFORTRAN
20-
#define SWIGFORTRAN
21-
#endif
22-
23-
24-
#ifdef __cplusplus
25-
/* SwigValueWrapper is described in swig.swg */
26-
template<typename T> class SwigValueWrapper {
27-
struct SwigMovePointer {
28-
T *ptr;
29-
SwigMovePointer(T *p) : ptr(p) { }
30-
~SwigMovePointer() { delete ptr; }
31-
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
32-
} pointer;
33-
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
34-
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
35-
public:
36-
SwigValueWrapper() : pointer(0) { }
37-
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
38-
operator T&() const { return *pointer.ptr; }
39-
T *operator&() { return pointer.ptr; }
40-
};
41-
42-
template <typename T> T SwigValueInit() {
43-
return T();
44-
}
45-
#endif
46-
4715
/* -----------------------------------------------------------------------------
4816
* This section contains generic SWIG labels for method/variable
4917
* declarations/attributes, and other compiler dependent labels.
@@ -181,7 +149,7 @@ template <typename T> T SwigValueInit() {
181149
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
182150
{ throw std::logic_error("In " DECL ": " MSG); }
183151

184-
/* Errors in SWIG */
152+
/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
185153
#define SWIG_UnknownError -1
186154
#define SWIG_IOError -2
187155
#define SWIG_RuntimeError -3
@@ -198,7 +166,6 @@ template <typename T> T SwigValueInit() {
198166

199167

200168

201-
202169
#ifdef __cplusplus
203170
extern "C" {
204171
#endif
@@ -214,6 +181,58 @@ SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *
214181
SWIG_store_exception(DECL, CODE, MSG); RETURNNULL;
215182

216183

184+
185+
#define SWIG_VERSION 0x040100
186+
#define SWIGFORTRAN
187+
188+
#ifdef __cplusplus
189+
#include <utility>
190+
/* SwigValueWrapper is described in swig.swg */
191+
template<typename T> class SwigValueWrapper {
192+
struct SwigSmartPointer {
193+
T *ptr;
194+
SwigSmartPointer(T *p) : ptr(p) { }
195+
~SwigSmartPointer() { delete ptr; }
196+
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
197+
void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
198+
} pointer;
199+
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
200+
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
201+
public:
202+
SwigValueWrapper() : pointer(0) { }
203+
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
204+
#if __cplusplus >=201103L
205+
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
206+
operator T&&() const { return std::move(*pointer.ptr); }
207+
#else
208+
operator T&() const { return *pointer.ptr; }
209+
#endif
210+
T *operator&() const { return pointer.ptr; }
211+
static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
212+
};
213+
214+
/*
215+
* SwigValueInit() is a generic initialisation solution as the following approach:
216+
*
217+
* T c_result = T();
218+
*
219+
* doesn't compile for all types for example:
220+
*
221+
* unsigned int c_result = unsigned int();
222+
*/
223+
template <typename T> T SwigValueInit() {
224+
return T();
225+
}
226+
227+
#if __cplusplus >=201103L
228+
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
229+
#else
230+
# define SWIG_STD_MOVE(OBJ) OBJ
231+
#endif
232+
233+
#endif
234+
235+
217236
#include <stdexcept>
218237

219238

@@ -226,10 +245,6 @@ SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *
226245
if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
227246

228247

229-
#define SWIGVERSION 0x040100
230-
#define SWIG_VERSION SWIGVERSION
231-
232-
233248
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
234249
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
235250

@@ -286,10 +301,10 @@ SWIGEXPORT const char* flc_get_serr() {
286301
#include <string>
287302

288303

289-
extern "C" {
290-
291304
#include <cctype>
292305

306+
extern "C" {
307+
293308
// Call this function before any new action
294309
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl) {
295310
if (flc_ierr != 0) {

src/flc_algorithm.f90

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
! This file was automatically generated by SWIG (http://www.swig.org).
1+
! This file was automatically generated by SWIG (https://www.swig.org).
22
! Version 4.1.0+fortran
33
!
4-
! Do not make changes to this file unless you know what you are doing--modify
4+
! Do not make changes to this file unless you know what you are doing - modify
55
! the SWIG interface file instead.
66

77
! Flibcpp project, https://github.com/swig-fortran/flibcpp
@@ -34,45 +34,45 @@ module flc_algorithm
3434
type(C_PTR), public :: cptr = C_NULL_PTR
3535
integer(C_INT), public :: cmemflags = 0
3636
end type
37-
interface binary_search
38-
module procedure swigf_binary_search__SWIG_1, swigf_binary_search__SWIG_2, swigf_binary_search__SWIG_3, &
39-
swigf_binary_search__SWIG_4, swigf_binary_search__SWIG_5, swigf_binary_search__SWIG_6, swigf_binary_search__SWIG_7
37+
interface sort
38+
module procedure swigf_sort__SWIG_1, swigf_sort__SWIG_2, swigf_sort__SWIG_3, swigf_sort__SWIG_4, swigf_sort__SWIG_5, &
39+
swigf_sort__SWIG_6, swigf_sort__SWIG_7
4040
end interface
41-
public :: binary_search
41+
public :: sort
42+
interface argsort
43+
module procedure swigf_argsort__SWIG_1, swigf_argsort__SWIG_2, swigf_argsort__SWIG_3, swigf_argsort__SWIG_4, &
44+
swigf_argsort__SWIG_5, swigf_argsort__SWIG_6, swigf_argsort__SWIG_7
45+
end interface
46+
public :: argsort
47+
interface equal_range
48+
module procedure swigf_equal_range__SWIG_1, swigf_equal_range__SWIG_2, swigf_equal_range__SWIG_3, swigf_equal_range__SWIG_4, &
49+
swigf_equal_range__SWIG_5, swigf_equal_range__SWIG_6, swigf_equal_range__SWIG_7
50+
end interface
51+
public :: equal_range
4252
interface minmax_element
4353
module procedure swigf_minmax_element__SWIG_1, swigf_minmax_element__SWIG_2, swigf_minmax_element__SWIG_3, &
4454
swigf_minmax_element__SWIG_4, swigf_minmax_element__SWIG_5, swigf_minmax_element__SWIG_6, swigf_minmax_element__SWIG_7
4555
end interface
4656
public :: minmax_element
47-
interface shuffle
48-
module procedure swigf_shuffle__SWIG_1, swigf_shuffle__SWIG_2, swigf_shuffle__SWIG_3, swigf_shuffle__SWIG_4
49-
end interface
50-
public :: shuffle
5157
interface includes
5258
module procedure swigf_includes__SWIG_1, swigf_includes__SWIG_2, swigf_includes__SWIG_3, swigf_includes__SWIG_4, &
5359
swigf_includes__SWIG_5, swigf_includes__SWIG_6, swigf_includes__SWIG_7
5460
end interface
5561
public :: includes
62+
interface shuffle
63+
module procedure swigf_shuffle__SWIG_1, swigf_shuffle__SWIG_2, swigf_shuffle__SWIG_3, swigf_shuffle__SWIG_4
64+
end interface
65+
public :: shuffle
66+
interface binary_search
67+
module procedure swigf_binary_search__SWIG_1, swigf_binary_search__SWIG_2, swigf_binary_search__SWIG_3, &
68+
swigf_binary_search__SWIG_4, swigf_binary_search__SWIG_5, swigf_binary_search__SWIG_6, swigf_binary_search__SWIG_7
69+
end interface
70+
public :: binary_search
5671
interface is_sorted
5772
module procedure swigf_is_sorted__SWIG_1, swigf_is_sorted__SWIG_2, swigf_is_sorted__SWIG_3, swigf_is_sorted__SWIG_4, &
5873
swigf_is_sorted__SWIG_5, swigf_is_sorted__SWIG_6, swigf_is_sorted__SWIG_7
5974
end interface
6075
public :: is_sorted
61-
interface equal_range
62-
module procedure swigf_equal_range__SWIG_1, swigf_equal_range__SWIG_2, swigf_equal_range__SWIG_3, swigf_equal_range__SWIG_4, &
63-
swigf_equal_range__SWIG_5, swigf_equal_range__SWIG_6, swigf_equal_range__SWIG_7
64-
end interface
65-
public :: equal_range
66-
interface sort
67-
module procedure swigf_sort__SWIG_1, swigf_sort__SWIG_2, swigf_sort__SWIG_3, swigf_sort__SWIG_4, swigf_sort__SWIG_5, &
68-
swigf_sort__SWIG_6, swigf_sort__SWIG_7
69-
end interface
70-
public :: sort
71-
interface argsort
72-
module procedure swigf_argsort__SWIG_1, swigf_argsort__SWIG_2, swigf_argsort__SWIG_3, swigf_argsort__SWIG_4, &
73-
swigf_argsort__SWIG_5, swigf_argsort__SWIG_6, swigf_argsort__SWIG_7
74-
end interface
75-
public :: argsort
7676

7777
! FUNCTION POINTER DECLARATIONS
7878
abstract interface
@@ -598,35 +598,35 @@ function swigc_includes__SWIG_7(farg1, farg3, farg5) &
598598
subroutine swigc_shuffle__SWIG_1(farg1, farg2) &
599599
bind(C, name="_wrap_shuffle__SWIG_1")
600600
use, intrinsic :: ISO_C_BINDING
601-
import :: swigclasswrapper
602601
import :: swigarraywrapper
602+
import :: swigclasswrapper
603603
type(SwigClassWrapper), intent(in) :: farg1
604604
type(SwigArrayWrapper) :: farg2
605605
end subroutine
606606

607607
subroutine swigc_shuffle__SWIG_2(farg1, farg2) &
608608
bind(C, name="_wrap_shuffle__SWIG_2")
609609
use, intrinsic :: ISO_C_BINDING
610-
import :: swigclasswrapper
611610
import :: swigarraywrapper
611+
import :: swigclasswrapper
612612
type(SwigClassWrapper), intent(in) :: farg1
613613
type(SwigArrayWrapper) :: farg2
614614
end subroutine
615615

616616
subroutine swigc_shuffle__SWIG_3(farg1, farg2) &
617617
bind(C, name="_wrap_shuffle__SWIG_3")
618618
use, intrinsic :: ISO_C_BINDING
619-
import :: swigclasswrapper
620619
import :: swigarraywrapper
620+
import :: swigclasswrapper
621621
type(SwigClassWrapper), intent(in) :: farg1
622622
type(SwigArrayWrapper) :: farg2
623623
end subroutine
624624

625625
subroutine swigc_shuffle__SWIG_4(farg1, farg2) &
626626
bind(C, name="_wrap_shuffle__SWIG_4")
627627
use, intrinsic :: ISO_C_BINDING
628-
import :: swigclasswrapper
629628
import :: swigarraywrapper
629+
import :: swigclasswrapper
630630
type(SwigClassWrapper), intent(in) :: farg1
631631
type(SwigArrayWrapper) :: farg2
632632
end subroutine

0 commit comments

Comments
 (0)