Skip to content

Commit 6b9ea45

Browse files
committed
Change std::set to use native fortran ints for size
1 parent 6189e5f commit 6b9ea45

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Examples/test-suite/fortran/li_std_set_runme.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ subroutine test_multiset_int
1616
use li_std_set, only : multiset_int => set_int
1717
implicit none
1818
type(multiset_int) :: s
19-
integer(c_size_t) :: num_erased
19+
integer :: num_erased
2020

2121
s = multiset_int()
2222
ASSERT(s%empty())

Lib/fortran/std_multiset.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* keys.
66
* ------------------------------------------------------------------------- */
77

8+
%include "std_common.i"
9+
810
%{
911
#include <set>
1012
%}
@@ -29,6 +31,9 @@ public:
2931
public:
3032
set();
3133

34+
// - Use native Fortran integers in proxy code
35+
%apply int FORTRAN_INT {size_type};
36+
3237
bool empty() const;
3338
size_type size() const;
3439
void clear();

Lib/fortran/std_set.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* std_set.i
33
* ------------------------------------------------------------------------- */
44

5+
%include "std_common.i"
6+
57
%{
68
#include <set>
79
%}
@@ -26,6 +28,9 @@ public:
2628
public:
2729
set();
2830

31+
// - Use native Fortran integers in proxy code
32+
%apply int FORTRAN_INT {size_type};
33+
2934
bool empty() const;
3035
size_type size() const;
3136
void clear();

0 commit comments

Comments
 (0)