title: Simple wrapping of C code with cython
body: <p>I have a number of C functions, and I would like to call them from python. cython seems to be the way to go, but I can't really find an example of how exactly this is done. My C function looks like this:</p>
  
  <pre><code>void calculate_daily ( char *db_name, int grid_id, int year,
                         double *dtmp, double *dtmn, double *dtmx, 
                         double *dprec, double *ddtr, double *dayl, 
                         double *dpet, double *dpar ) ;
  </code></pre>
  
  <p>All I want to do is to specify the first three parameters (a string and two integers), and recover 8 numpy arrays (or python lists. All the double arrays have N elements). My code assumes that the pointers are pointing to an already allocated chunk of memory. Also, the produced C code ought to link to some external libraries.</p>