title: Fast access to locale variable in a cpdef cython function
body: <p>I need fast access from python to a variable used in an algorithm written in cython:
  Here is the pseudocode:</p>
  
  <pre><code>cpdef(double a, double b):
      while a &lt; 100.:
          # some long-term calculations
          a = x
  </code></pre>
  
  <p>Because I call it from python I use a cpdef function. The user needs a hint of the progress of the long-term calculation. This can be done with access to the "a" variable. But it is not possible to use reference arguments (double &amp;a) or pointers (double *a) in a cpdef function (compiler errors). How is it possible to get fast access to the local variable of the function?</p>