title: ctypedef a cython function with default arguments
body: <p>I have a cython function like:</p>
  
  <pre><code>cdef void foo(int a, int b=1, int c=2):
      pass
  </code></pre>
  
  <p>and a getter function to return its address:</p>
  
  <pre><code>def get_foo():
      return &lt;size_t&gt;foo
  </code></pre>
  
  <p>so I can get function <code>foo</code>'s address somewhere and cast it back to the real function in cython(eg: a callback one can use in python).</p>
  
  <p>The problem is how to write such a type?</p>
  
  <p>I tried:</p>
  
  <pre><code>cdef void foo(int a, int b=1, int c=2):
      pass
  ctypedef void (*foo_type)(int a, int b, int c)
  cdef foo_type f = foo
  </code></pre>
  
  <p>this won't compile, cython complains: Cannot assign type 'void (int, struct __pyx_opt_args_46_cython_magic_49f265438c694830523a60bef4fe2ee8_foo *__pyx_optional_args)' to 'foo_type '</p>
  
  <p>From the error mesage , one can note that, the option(default) arguments are wrapped in a struct by cython.</p>
  
  <p>Is there a way to do such ctypedef in cython? If not, I think I'd better leave out the default value.:-(</p>