Extracting a pointer to the callback function

We can implement the callback function in Fortran, grab an F2PY-generated pointer to this function and feed that as the func1 argument such that Fortran calls Fortran and not Python
For a module m, the pointer to a function/subroutine f is reached as m.f._cpointer
    def ext_gridloop2_fcb_ptr(self):
        from callback import fcb
        a = ext_gridloop.gridloop2(self.xcoor, self.ycoor,
                                   fcb._cpointer)
        return a
fcb is a Fortran implementation of the callback in an F2PY-generated extension module callback

previousnexttable of contents