Skip to content

Commit 902b61f

Browse files
committed
Remove braces from typemaps
1 parent 8f6c98f commit 902b61f

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Lib/fortran/bindc.swg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
%typemap(bindc) const CLS* = const FORTRAN_INTRINSIC_TYPE*;
4848

4949
// Set up C type
50-
%typemap(ctype, in={const CLS*}, null={SWIG_null_struct_ ## CLS()}, fragment="SWIG_null_struct"{CLS}, noblock=1) CLS {
50+
%typemap(ctype, in="const " #CLS "*", null="SWIG_null_struct_" #CLS "()", fragment="SWIG_null_struct"{CLS}, noblock=1) CLS {
5151
CLS
5252
}
5353

Lib/fortran/boost_shared_ptr.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
* Deferred copy of basic settings from non-SP type (i.e. Fortran will see it the same; we override the in/out/ctype below)
4343
*/
4444

45-
%typemap(ftype, in={$typemap(ftype:in, TYPE*)}, noblock=1) SWIGSP__, SWIGSP_PTRS__
45+
%typemap(ftype, in="$typemap(ftype:in, " #TYPE "*)", noblock=1) SWIGSP__, SWIGSP_PTRS__
4646
{$typemap(ftype, TYPE*)}
47-
%typemap(ftype, in={$typemap(ftype:in, const TYPE*)}, noblock=1) SWIGSP_CPTRS__
47+
%typemap(ftype, in="$typemap(ftype:in, const " #TYPE "*)", noblock=1) SWIGSP_CPTRS__
4848
{$typemap(ftype, const TYPE*)}
4949

5050
/* -------------------------------------------------------------------------

Lib/fortran/complex.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct SwigComplex_ ## CTYPE;
3232
%apply SwigComplex_ ## CTYPE ARRAY[] { CPPTYPE ARRAY[] };
3333
%apply SwigComplex_ ## CTYPE[ANY] { CPPTYPE[ANY] };
3434

35-
%typemap(ctype, in="SwigComplex_" #CTYPE "*", null="SWIG_create_complex_" # CTYPE "(0, 0)", fragment="SWIG_complex_"{CTYPE}, noblock=1) CPPTYPE {
35+
%typemap(ctype, in="SwigComplex_" #CTYPE "*", null="SWIG_create_complex_" #CTYPE "(0, 0)", fragment="SWIG_complex_"{CTYPE}, noblock=1) CPPTYPE {
3636
SwigComplex_ ## CTYPE
3737
}
3838
%typemap(in, noblock=1) CPPTYPE {

Lib/fortran/fortranarray.swg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ end subroutine}
5757
%fortran_array(CPPTYPE)
5858

5959
// Fortran proxy code: input is target 1D array
60-
%typemap(ftype, in={$typemap(imtype, VTYPE), dimension(:), target}, noblock=1) CPPTYPE {
60+
%typemap(ftype, in="$typemap(imtype, " #VTYPE "), dimension(:), target", noblock=1) CPPTYPE {
6161
$typemap(imtype, VTYPE), dimension(:), pointer
6262
}
6363

@@ -90,7 +90,7 @@ end subroutine}
9090
%define %fortran_array_handle(VTYPE, CPPTYPE...)
9191

9292
// Input arguments for pointer-by-ref are the same
93-
%typemap(ftype, in={$typemap(imtype, VTYPE), dimension(:), pointer, intent(inout)}, noblock=1) CPPTYPE& {
93+
%typemap(ftype, in="$typemap(imtype, " #VTYPE "), dimension(:), pointer, intent(inout)", noblock=1) CPPTYPE& {
9494
$typemap(imtype, VTYPE), dimension(:), pointer
9595
}
9696
%typemap(fin, match="ftype", noblock=1) CPPTYPE& {$typemap(fin, VTYPE ARRAY[])}

Lib/fortran/fundamental.swg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ SWIGINTERN SwigArrayWrapper SwigArrayWrapper_uninitialized() {
143143
%fortran_apply_typemaps(FORTRAN_INTRINSIC_TYPE, CTYPE)
144144

145145
// Regular values are passed as pointers and returned by value
146-
%typemap(ctype, in={const CTYPE*}) CTYPE
146+
%typemap(ctype, in="const " #CTYPE "*") CTYPE
147147
%{CTYPE%}
148-
%typemap(imtype, in={FTYPE(FKIND), intent(in)}) CTYPE
148+
%typemap(imtype, in=#FTYPE "(" #FKIND "), intent(in)") CTYPE
149149
%{FTYPE(FKIND)%}
150-
%typemap(ftype, in={FTYPE(FKIND), intent(in)}) CTYPE
150+
%typemap(ftype, in=#FTYPE "(" #FKIND "), intent(in)") CTYPE
151151
%{FTYPE(FKIND)%}
152-
%typemap(bindc, in={FTYPE(FKIND), intent(in), value}, kind={FKIND},
153-
fortranconst={FTYPE(FKIND)}) CTYPE
152+
%typemap(bindc, in=#FTYPE "(" #FKIND "), intent(in), value", kind=#FKIND,
153+
fortranconst=#FTYPE "(" #FKIND ")") CTYPE
154154
%{FTYPE(FKIND)%}
155155
%typemap(in) CTYPE = FORTRAN_INTRINSIC_TYPE;
156156
%typemap(out) CTYPE = FORTRAN_INTRINSIC_TYPE;

Lib/fortran/typemaps.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $2 = $input->size;
2626
%apply (SWIGTYPE *DATA, size_t SIZE) { (const SWIGTYPE *DATA, size_t SIZE) };
2727

2828
/* Add 'intent(in)' for const arrays */
29-
%typemap(ftype, in={$typemap(imtype, $*1_ltype), dimension(:), intent(in), target}, noblock=1) (const SWIGTYPE *DATA, size_t SIZE) {
29+
%typemap(ftype, in="$typemap(imtype, $*1_ltype), dimension(:), intent(in), target", noblock=1) (const SWIGTYPE *DATA, size_t SIZE) {
3030
$typemap(imtype, $*1_ltype), dimension(:), pointer
3131
}
3232

0 commit comments

Comments
 (0)