Skip to content

Commit 4e80cc2

Browse files
authored
Update SWIG with correct SWIGEXPORT qualifiers on forward declarations (#12)
1 parent d043736 commit 4e80cc2

12 files changed

+126
-126
lines changed

src/flc.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! This file was automatically generated by SWIG (http://www.swig.org).
2-
! Version 4.0.0
2+
! Version 4.0.2
33
!
44
! Do not make changes to this file unless you know what you are doing--modify
55
! the SWIG interface file instead.
@@ -35,11 +35,11 @@ module flc
3535
integer(C_INT), parameter, public :: SWIG_MemoryError = -12_C_INT
3636
integer(C_INT), parameter, public :: SWIG_NullReferenceError = -13_C_INT
3737
public :: get_flibcpp_version
38-
integer(C_INT), protected, public, &
38+
integer(C_INT), public, protected, &
3939
bind(C, name="flibcpp_version_major") :: flibcpp_version_major
40-
integer(C_INT), protected, public, &
40+
integer(C_INT), public, protected, &
4141
bind(C, name="flibcpp_version_minor") :: flibcpp_version_minor
42-
integer(C_INT), protected, public, &
42+
integer(C_INT), public, protected, &
4343
bind(C, name="flibcpp_version_patch") :: flibcpp_version_patch
4444

4545
! WRAPPER DECLARATIONS
@@ -74,20 +74,20 @@ function swigc_flibcpp_version_get() &
7474
subroutine SWIGTM_fout_char_Sm_(imout, fout)
7575
use, intrinsic :: ISO_C_BINDING
7676
type(SwigArrayWrapper), intent(in) :: imout
77-
character(kind=C_CHAR, len=:), allocatable, intent(out) :: fout
77+
character(len=:), allocatable, intent(out) :: fout
7878
character(kind=C_CHAR), dimension(:), pointer :: chars
7979
integer(kind=C_SIZE_T) :: i
8080
call c_f_pointer(imout%data, chars, [imout%size])
8181
allocate(character(kind=C_CHAR, len=imout%size) :: fout)
8282
do i=1, imout%size
83-
fout(i:i) = chars(i)
83+
fout(i:i) = char(ichar(chars(i)))
8484
end do
8585
end subroutine
8686

8787
function get_serr() &
8888
result(swig_result)
8989
use, intrinsic :: ISO_C_BINDING
90-
character(kind=C_CHAR, len=:), allocatable :: swig_result
90+
character(len=:), allocatable :: swig_result
9191
type(SwigArrayWrapper) :: fresult
9292

9393
fresult = swigc_get_serr()
@@ -98,7 +98,7 @@ function get_serr() &
9898
function get_flibcpp_version() &
9999
result(swig_result)
100100
use, intrinsic :: ISO_C_BINDING
101-
character(kind=C_CHAR, len=:), allocatable :: swig_result
101+
character(len=:), allocatable :: swig_result
102102
type(SwigArrayWrapper) :: fresult
103103

104104
fresult = swigc_flibcpp_version_get()

src/flcFORTRAN_wrap.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ----------------------------------------------------------------------------
22
* This file was automatically generated by SWIG (http://www.swig.org).
3-
* Version 4.0.0
3+
* Version 4.0.2
44
*
55
* This file is not intended to be easily readable and contains a number of
66
* coding conventions designed to improve portability and efficiency. Do not make
@@ -104,15 +104,6 @@ template <typename T> T SwigValueInit() {
104104
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105105
#endif
106106

107-
/* qualifier for exported *const* global data variables*/
108-
#ifndef SWIGEXTERN
109-
# ifdef __cplusplus
110-
# define SWIGEXTERN extern
111-
# else
112-
# define SWIGEXTERN
113-
# endif
114-
#endif
115-
116107
/* exporting methods */
117108
#if defined(__GNUC__)
118109
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -172,6 +163,15 @@ template <typename T> T SwigValueInit() {
172163
#endif
173164

174165

166+
#ifndef SWIGEXTERN
167+
# ifdef __cplusplus
168+
# define SWIGEXTERN extern
169+
# else
170+
# define SWIGEXTERN
171+
# endif
172+
#endif
173+
174+
175175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
176176
{ throw std::logic_error("In " DECL ": " MSG); }
177177

@@ -196,8 +196,8 @@ template <typename T> T SwigValueInit() {
196196
#ifdef __cplusplus
197197
extern "C" {
198198
#endif
199-
void SWIG_check_unhandled_exception_impl(const char* decl);
200-
void SWIG_store_exception(const char* decl, int errcode, const char *msg);
199+
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl);
200+
SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *msg);
201201
#ifdef __cplusplus
202202
}
203203
#endif
@@ -220,7 +220,7 @@ void SWIG_store_exception(const char* decl, int errcode, const char *msg);
220220
if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
221221

222222

223-
#define SWIGVERSION 0x040000
223+
#define SWIGVERSION 0x040002
224224
#define SWIG_VERSION SWIGVERSION
225225

226226

src/flc_algorithm.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! This file was automatically generated by SWIG (http://www.swig.org).
2-
! Version 4.0.0
2+
! Version 4.0.2
33
!
44
! Do not make changes to this file unless you know what you are doing--modify
55
! the SWIG interface file instead.

src/flc_algorithmFORTRAN_wrap.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ----------------------------------------------------------------------------
22
* This file was automatically generated by SWIG (http://www.swig.org).
3-
* Version 4.0.0
3+
* Version 4.0.2
44
*
55
* This file is not intended to be easily readable and contains a number of
66
* coding conventions designed to improve portability and efficiency. Do not make
@@ -104,15 +104,6 @@ template <typename T> T SwigValueInit() {
104104
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105105
#endif
106106

107-
/* qualifier for exported *const* global data variables*/
108-
#ifndef SWIGEXTERN
109-
# ifdef __cplusplus
110-
# define SWIGEXTERN extern
111-
# else
112-
# define SWIGEXTERN
113-
# endif
114-
#endif
115-
116107
/* exporting methods */
117108
#if defined(__GNUC__)
118109
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -172,15 +163,24 @@ template <typename T> T SwigValueInit() {
172163
#endif
173164

174165

166+
#ifndef SWIGEXTERN
167+
# ifdef __cplusplus
168+
# define SWIGEXTERN extern
169+
# else
170+
# define SWIGEXTERN
171+
# endif
172+
#endif
173+
174+
175175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
176176
{ throw std::logic_error("In " DECL ": " MSG); }
177177

178178

179179
#ifdef __cplusplus
180180
extern "C" {
181181
#endif
182-
void SWIG_check_unhandled_exception_impl(const char* decl);
183-
void SWIG_store_exception(const char* decl, int errcode, const char *msg);
182+
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl);
183+
SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *msg);
184184
#ifdef __cplusplus
185185
}
186186
#endif
@@ -245,7 +245,7 @@ enum AssignmentType {
245245
if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
246246

247247

248-
#define SWIGVERSION 0x040000
248+
#define SWIGVERSION 0x040002
249249
#define SWIG_VERSION SWIGVERSION
250250

251251

src/flc_random.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! This file was automatically generated by SWIG (http://www.swig.org).
2-
! Version 4.0.0
2+
! Version 4.0.2
33
!
44
! Do not make changes to this file unless you know what you are doing--modify
55
! the SWIG interface file instead.

src/flc_randomFORTRAN_wrap.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ----------------------------------------------------------------------------
22
* This file was automatically generated by SWIG (http://www.swig.org).
3-
* Version 4.0.0
3+
* Version 4.0.2
44
*
55
* This file is not intended to be easily readable and contains a number of
66
* coding conventions designed to improve portability and efficiency. Do not make
@@ -104,15 +104,6 @@ template <typename T> T SwigValueInit() {
104104
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105105
#endif
106106

107-
/* qualifier for exported *const* global data variables*/
108-
#ifndef SWIGEXTERN
109-
# ifdef __cplusplus
110-
# define SWIGEXTERN extern
111-
# else
112-
# define SWIGEXTERN
113-
# endif
114-
#endif
115-
116107
/* exporting methods */
117108
#if defined(__GNUC__)
118109
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -172,15 +163,24 @@ template <typename T> T SwigValueInit() {
172163
#endif
173164

174165

166+
#ifndef SWIGEXTERN
167+
# ifdef __cplusplus
168+
# define SWIGEXTERN extern
169+
# else
170+
# define SWIGEXTERN
171+
# endif
172+
#endif
173+
174+
175175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
176176
{ throw std::logic_error("In " DECL ": " MSG); }
177177

178178

179179
#ifdef __cplusplus
180180
extern "C" {
181181
#endif
182-
void SWIG_check_unhandled_exception_impl(const char* decl);
183-
void SWIG_store_exception(const char* decl, int errcode, const char *msg);
182+
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl);
183+
SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *msg);
184184
#ifdef __cplusplus
185185
}
186186
#endif
@@ -245,7 +245,7 @@ enum AssignmentType {
245245
if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
246246

247247

248-
#define SWIGVERSION 0x040000
248+
#define SWIGVERSION 0x040002
249249
#define SWIG_VERSION SWIGVERSION
250250

251251

src/flc_set.f90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! This file was automatically generated by SWIG (http://www.swig.org).
2-
! Version 4.0.0
2+
! Version 4.0.2
33
!
44
! Do not make changes to this file unless you know what you are doing--modify
55
! the SWIG interface file instead.
@@ -665,14 +665,14 @@ subroutine swigf_SetString_clear(self)
665665

666666
subroutine SWIGTM_fin_char_Sm_(finp, iminp, temp)
667667
use, intrinsic :: ISO_C_BINDING
668-
character(kind=C_CHAR, len=*), intent(in) :: finp
668+
character(len=*), intent(in) :: finp
669669
type(SwigArrayWrapper), intent(out) :: iminp
670670
character(kind=C_CHAR), dimension(:), target, allocatable, intent(out) :: temp
671671
integer :: i
672672

673673
allocate(character(kind=C_CHAR) :: temp(len(finp) + 1))
674674
do i=1,len(finp)
675-
temp(i) = finp(i:i)
675+
temp(i) = char(ichar(finp(i:i)), kind=C_CHAR)
676676
end do
677677
i = len(finp) + 1
678678
temp(i) = C_NULL_CHAR ! C finp compatibility
@@ -683,7 +683,7 @@ subroutine SWIGTM_fin_char_Sm_(finp, iminp, temp)
683683
subroutine swigf_SetString_erase(self, x, swig_result)
684684
use, intrinsic :: ISO_C_BINDING
685685
class(SetString), intent(in) :: self
686-
character(kind=C_CHAR, len=*), target :: x
686+
character(len=*), target :: x
687687
integer, intent(out), optional :: swig_result
688688
integer(C_LONG) :: fresult
689689
type(SwigClassWrapper) :: farg1
@@ -704,7 +704,7 @@ function swigf_SetString_count(self, x) &
704704
use, intrinsic :: ISO_C_BINDING
705705
integer :: swig_result
706706
class(SetString), intent(in) :: self
707-
character(kind=C_CHAR, len=*), target :: x
707+
character(len=*), target :: x
708708
integer(C_LONG) :: fresult
709709
type(SwigClassWrapper) :: farg1
710710
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_temp
@@ -719,7 +719,7 @@ function swigf_SetString_count(self, x) &
719719
subroutine swigf_SetString_insert(self, x)
720720
use, intrinsic :: ISO_C_BINDING
721721
class(SetString), intent(in) :: self
722-
character(kind=C_CHAR, len=*), target :: x
722+
character(len=*), target :: x
723723
type(SwigClassWrapper) :: farg1
724724
character(kind=C_CHAR), dimension(:), allocatable, target :: farg2_temp
725725
type(SwigArrayWrapper) :: farg2

src/flc_setFORTRAN_wrap.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ----------------------------------------------------------------------------
22
* This file was automatically generated by SWIG (http://www.swig.org).
3-
* Version 4.0.0
3+
* Version 4.0.2
44
*
55
* This file is not intended to be easily readable and contains a number of
66
* coding conventions designed to improve portability and efficiency. Do not make
@@ -104,15 +104,6 @@ template <typename T> T SwigValueInit() {
104104
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
105105
#endif
106106

107-
/* qualifier for exported *const* global data variables*/
108-
#ifndef SWIGEXTERN
109-
# ifdef __cplusplus
110-
# define SWIGEXTERN extern
111-
# else
112-
# define SWIGEXTERN
113-
# endif
114-
#endif
115-
116107
/* exporting methods */
117108
#if defined(__GNUC__)
118109
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -172,15 +163,24 @@ template <typename T> T SwigValueInit() {
172163
#endif
173164

174165

166+
#ifndef SWIGEXTERN
167+
# ifdef __cplusplus
168+
# define SWIGEXTERN extern
169+
# else
170+
# define SWIGEXTERN
171+
# endif
172+
#endif
173+
174+
175175
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
176176
{ throw std::logic_error("In " DECL ": " MSG); }
177177

178178

179179
#ifdef __cplusplus
180180
extern "C" {
181181
#endif
182-
void SWIG_check_unhandled_exception_impl(const char* decl);
183-
void SWIG_store_exception(const char* decl, int errcode, const char *msg);
182+
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl);
183+
SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *msg);
184184
#ifdef __cplusplus
185185
}
186186
#endif
@@ -246,7 +246,7 @@ enum AssignmentType {
246246
if (!(EXPR)) { SWIG_exception_impl("$decl", SWIG_ValueError, MSG, RETURNNULL); }
247247

248248

249-
#define SWIGVERSION 0x040000
249+
#define SWIGVERSION 0x040002
250250
#define SWIG_VERSION SWIGVERSION
251251

252252

0 commit comments

Comments
 (0)