title: How to use inline function in Cython
body: <p>I am new in Cython and I have a problem compiling an inline function. The simplified code is:</p>
  
  <pre><code>cdef inline REG8(ulong addr):
     (&lt;volatile_uchar_ptr *&gt;(addr))[0]
  </code></pre>
  
  <p>I am trying to use the inline function inside a Python method:</p>
  
  <pre><code>def test(self):
      REG8(addr) = 0x08                         # ==&gt; Error: "Cannot assign or delete this".
      (&lt;volatile_uchar_ptr *&gt;(addr))[0] = 0x08  # ==&gt; OK. 
  </code></pre>
  
  <p>When I use the inline function <code>REG8()</code>, I get the compiler error:
  <code>Cannot assign or delete this</code>. However, the inserted code will work. I have no clue what is wrong here and will appreciate any help.</p>