[NumPy-Tickets] [NumPy] #1679: f2py throws AssertionError on fortran 90 files which declare routines with C bindings

NumPy Trac numpy-tickets@scipy....
Thu Nov 18 18:58:41 CST 2010


#1679: f2py throws AssertionError on fortran 90 files which declare routines with
C bindings
-------------------------+--------------------------------------------------
 Reporter:  davidpowell  |       Owner:  pearu      
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  numpy.f2py   |     Version:  1.3.0      
 Keywords:               |  
-------------------------+--------------------------------------------------
 When running f2py on a fortran 90 file with the following contents:

 {{{
 interface
     function my_func(x) bind(c,name='my_func')
         use iso_c_binding
         real(c_double), intent(in) :: x
         real(c_double) :: my_func
     end function
 end interface
 }}}

 It causes an exception in f2py, ending with the following line:

 {{{
   File "C:\Python26\lib\site-packages\numpy\f2py\crackfortran.py", line
 665, in markoutercomma
     assert not f,`f,line,l,cc`
 AssertionError: (1, "x@)@ bind@(@c,name='my_func'", "x@)@
 bind@(@c,name='my_func'", ')')
 }}}

 As far as I understand this is just a bug in the parser, since f2py
 shouldn't care that my fortran code is internally calling C routines.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1679>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list