[ctypes-users] type conversion question
by Axel Seibert other posts by this author
Nov 5 2005 3:43AM messages near this date
[ctypes-users] Byte ordering
|
[ctypes-users] Can support for ctypes.com be dropped?
Dear Thomas & List!
Is this by design?
That's what I expect:
> >> from ctypes import *
> >> a=c_uint(0)
> >> a
c_ulong(0)
But the following not:
> >> class E(Structure): _fields_ = [('a', c_uint)]
...
> >> e=E(0)
> >> e.a
0L
> >> e.a.__class__
<type 'long'>
That gives problems e.g. When taking output from one DLL function and
feeding it as input to the next DLL function, as ctypes will complain that
it expected a ctypes data structure.
I'm not sure, why I stumbled across this only now... Or is there something I
am missing?
Thanx for any pointers!
Axel
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
ctypes-users mailing list
ctypes-users@[...].net
https://lists.sourceforge.net/lists/listinfo/ctypes-users
|