Jach Fong wrote:
 >>> pvoid = ctypes.c_void_p(ctypes.addressof(buf0))
 >>> pvoid.contents
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'c_void_p' object has no attribute 'contents'

I think the 'contents' attribute only applies to pointers that are
pointing at part of another Python object. Your c_void_p instance
is not that kind of pointer.

I must say the ctypes documentation is rather confusing when it
comes to these kinds of details. It doesn't help that the "Pointers
and Arrays" section is marked as "Not yet written". Does anyone
have any plans to finish it?

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to