[Numpy-tickets] [NumPy] #962: f2py external callbacks don't work

NumPy numpy-tickets@scipy....
Wed Dec 3 09:41:21 CST 2008

#962: f2py external callbacks don't work
 Reporter:  wieferink   |        Owner:  somebody
     Type:  defect      |       Status:  new     
 Priority:  normal      |    Milestone:  1.3.0   
Component:  numpy.f2py  |      Version:  devel   
 Severity:  normal      |   Resolution:          
 Keywords:              |  
Comment (by wieferink):

 I made a more minimal example (download the shell archive for details):
 subroutine worker_caller
   implicit none
   !f2py intent(callback) cb_func
   external cb_func
   call cb_func('res')
 end subroutine worker_caller

 "{{{f2py -m master -h master.pyf master.f90 --overwrite-signature}}}"
 on this genereates the callback interface:
 subroutine cb_func(e__res_e) ! in :master:master.f90:worker_caller:unkno
   intent(callback) cb_func
   character*(*) :: e__res_e
 end subroutine cb_func
 which seems correct.  The generated extension module has the interface
 Call-back functions:
   def cb_func(e__res_e,cb_func): return
   Required arguments:
     e__res_e : input string(len=-1)
     cb_func : input float
 i.e. an superious cb_func argument to cb_func.  This should be catched.


Ticket URL: <http://scipy.org/scipy/numpy/ticket/962#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list