[Pyrex] Funny behaviour with unsigned int struct members (unwanted conversion to signed int...)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 4 03:46:58 CEST 2006


Heiko Wundram wrote:

> This should actually create a PyLong_FromUnsignedLong() (at least on 32-bit 
> platforms), as an unsigned int doesn't fit in a Python integer object there,

Pyrex has no idea what size anything is. The best I could
do would be to always use PyLong_FromUnsignedLong on an
unsigned int or long. I'll have to think about this.

In the meantime, you may have to cast it to an unsigned
long before letting Pyrex convert it.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiam!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list