title: Python Function Capsules
body: <p>I found this code snippet in the help of python 2.7.5, which is a chapter about exposing a C-API to other modules in the Extending Python with C and C++ section: Providing a C API for an Extension Module</p>
  
  <pre><code>/* C API functions */
  #define PySpam_System_NUM 0
  #define PySpam_System_RETURN int
  #define PySpam_System_PROTO (const char *command)
  // ...
  static PySpam_System_RETURN PySpam_System PySpam_System_PROTO;
  // ...
  static void **PySpam_API;
  
  #define PySpam_System \
  (*(PySpam_System_RETURN (*)PySpam_System_PROTO) PySpam_API[PySpam_System_NUM])
  </code></pre>
  
  <p>This snipped is for function capsules. A capsule is used to pass functions between two modules.
  But what's the meaning of this snippet: <code>[...] (PySpam_SystemRETURN (*)PySpam_System_PROTO) [...]</code>.
  I think it's something like a static cast. Something like <code>(int(*)(char s))</code>. But what's the meaning of this construct?</p>