Hi,
I have a result from a call to a ctypes function of type c_void_p.
Now I'd like to convert it to a pointer to one of the structures, that I
defined.
result = library.c_function(params)
class MyStruct(ctypes.Structure):
_fields_ = [
('fourbytes', ctypes.c_char * 4)
]
I know I could (prior to calling) specify what datatype the function
should return)
However as depending on some other conditions I have to interpret the
return value either as pointer to one or another data type or another one.
Id' like to perform the casting after having received the value.
Thanks in advance for any pointers.
--
http://mail.python.org/mailman/listinfo/python-list