I've a struct with void pointer member and trying to print it's value. I'm getting the type as int. How do i retrieve it values.
Below is my python code, How do i read p values.
class MyStruct(Structure):
_fields_ = [
("p", c_void_p)
]
def test():
t = MyStruct()
val = [1, 2, 3]
v = (c_int * len(val) )(*val)
t.p = cast(v, c_void_p)
print(type(t.p))
if __name__ == '__main__':
test()
Output:
<class 'int'>