title: References in Cython
body: <p>I'm having some trouble experimenting with references in Cython.
  I'm using this code to create an int and make a reference to it. </p>
  
  <pre><code>cdef int i = 10;
  cdef int&amp; integer_ref = i;
  </code></pre>
  
  <p>However, I cant figure out how to change the value of i through integer_ref. In C, I'd just use <code>integer_ref = some_other_value</code>, and that would set the value of <code>i</code> to <code>some_other_value</code>. </p>
  
  <p>However, doing that in cython returns an error because assignment to a reference isn't allowed. 
  I tried <code>integer_ref[0] = some_other_value</code> as well, but that attempts to index an <code>int &amp;</code> which is not allowed. What should i be using?
  I found <a href="https://groups.google.com/forum/#!topic/cython-users/j58Sp3QMrD4" rel="noreferrer">this post on the cython-users list</a> that seems to imply that it's a known bug, but I'm not too sure. The workaround in the link of using <code>(&amp;integer_ref)[0] = some_other_value</code> also did not work for me.</p>
  
  <p>Thanks!</p>