how ctypes bitfields really work?
<p>In python, using ctypes, following is legal:</p>

<pre><code>from ctypes import *
class POINT(Structure):
    _fields_ = [("x", c_int),
     ("y", c_int)]

p = POINT(10,20)
sum = p.x + p.y
</code></pre>

<p>But how this works? I mean how p.x is perfectly legal? What kind of trick provides this?
thanks.</p>