You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By doing this I have the Fortran wrapper containing the prefixe pure for the function in the C interface:
interface
[...other functions implemented...]
pure function c_class1_get_intvalue(self) result(SHT_rv) bind(C, name="TUT_tutorial_Class1_get_intvalue")
use iso_c_binding, only : C_INT
import :: SHROUD_class1_capsule
implicit none
type(SHROUD_class1_capsule), intent(IN) :: self
integer(C_INT) :: SHT_rv
end function c_class1_get_intvalue
end interface
But not for the function in the contains block:
function class1_get_intvalue(obj) &
result(SHT_rv)
use iso_c_binding, only : C_INT
class(class1) :: obj
integer(C_INT) :: SHT_rv
! splicer begin namespace.tutorial.class.Class1.method.get_intvalue
SHT_rv = c_class1_get_intvalue(obj%cxxmem)
! splicer end namespace.tutorial.class.Class1.method.get_intvalue
end function class1_get_intvalue
I could solve this by changing from this to:
pure function class1_get_intvalue(obj) &
result(SHT_rv)
use iso_c_binding, only : C_INT
class(class1), intent(in) :: obj
integer(C_INT) :: SHT_rv
! splicer begin namespace.tutorial.class.Class1.method.get_intvalue
SHT_rv = c_class1_get_intvalue(obj%cxxmem)
! splicer end namespace.tutorial.class.Class1.method.get_intvalue
end function class1_get_intvalue
Is this not supported yet or am I missing something?
Thank you very much!
Felipe Silva Carvalho
The text was updated successfully, but these errors were encountered:
Hello :)
I am trying to implement a class member function whith the
+pure
input on shroud, i.e.:By doing this I have the Fortran wrapper containing the prefixe
pure
for the function in the C interface:But not for the function in the
contains
block:I could solve this by changing from this to:
Is this not supported yet or am I missing something?
Thank you very much!
Felipe Silva Carvalho
The text was updated successfully, but these errors were encountered: