robertwb / issues-import-test

0 stars 0 forks source link

function pointers not accepted as function arguments #57

Open robertwb opened 8 years ago

robertwb commented 8 years ago

Reported by robertwb on 29 Jul 2008 07:23 UTC The following should work.

cdef int foo(int x):
    return x*x*x-x

cdef call_foo(int x, int (*f)(int)):
    return f(x)

print call_foo(3, &foo)

Migrated-From: http://trac.cython.org/ticket/31