Type Conversions for unsigned integers

Nikolaus Rath <[email protected]>
Newsgroups gmane.comp.python.ctypes
Message-ID <[email protected]>
Hello,

Why does the c_uint8 type behave so different from the others?

>>> c_uint8(-1).value
-1
>>> c_uint16(-1).value
65535
>>> c_uint32(-1).value
4294967295L
>>> c_uint(-1).value
4294967295L


Best,    

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
ctypes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ctypes-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.