title: How do I pass a pointer to a C function with Python's CFFI?
body: <p>How can I pass a pointer to a C function with Python's CFFI?</p>
  
  <p>For example, if the library I'm wrapping has two functions:</p>
  
  <pre><code>void some_function(void (*callback)()) {
      callback();
  }
  
  void some_callback() {
      printf("callback!\n");
  }
  </code></pre>
  
  <p>How can I call <code>some_function</code> passing in <code>some_callback</code>? For example, something like:</p>
  
  <pre><code>from mylib._ffi import lib
  lib.some_function(lib.some_callback)
  </code></pre>
  
  <p>I know that I can use <code>ffi.callback(…)</code> to wrap a Python function in a callback, but I'm wondering if it's possible to avoid duplicating the type signature and whatnot of the C function.</p>