Skip to content

Commit 0b6eaf3

Browse files
committed
Try renaming to avoid name mangling
1 parent 2943e1f commit 0b6eaf3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/example_fgen_basic/get_wavelength.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ module m_get_wavelength
1313
real(kind=dp), parameter, public :: speed_of_light = 2.99792e8_dp
1414
!! Speed of light [m/s]
1515

16-
public :: get_wavelength
16+
public :: inner_get_wavelength
1717

1818
contains
1919

20-
pure function get_wavelength(frequency) result(wavelength)
20+
pure function inner_get_wavelength(frequency) result(wavelength)
2121
!! Get wavelength of light for a given frequency
2222
!
2323
! Trying with FORD style docstrings for now
@@ -31,6 +31,6 @@ pure function get_wavelength(frequency) result(wavelength)
3131

3232
wavelength = speed_of_light / frequency
3333

34-
end function get_wavelength
34+
end function inner_get_wavelength
3535

3636
end module m_get_wavelength

src/example_fgen_basic/get_wavelength_wrapper.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
!> so there will be one extra file compared to what we have here.
1010
module m_get_wavelength_w ! Convention to date: just suffix wrappers with _w
1111

12-
use m_get_wavelength, only: o_get_wavelength => get_wavelength
12+
use m_get_wavelength, only: inner_get_wavelength
1313
! We won't always need the renaming trick,
1414
! but here we do as the wrapper function
1515
! and the original function should have the same name.
@@ -34,7 +34,7 @@ pure function get_wavelength(frequency) result(wavelength)
3434
real(kind=dp) :: wavelength
3535
!! Corresponding wavelength
3636

37-
wavelength = o_get_wavelength(frequency)
37+
wavelength = inner_get_wavelength(frequency)
3838

3939
end function get_wavelength
4040

0 commit comments

Comments
 (0)