FAQ - How do I declare that a CTypes function returns void?

P

p.lavarre

Now at http://pyfaq.infogami.com/suggest we have:

FAQ: How do I declare that CTypes function returns void?

A: c_void = None is not doc'ed, but is suggested by:
Remembering c_void = c_int from K&R C often works, but if you say a
restype is c_int, then doctest's of that call will print an int, yuck.
If you say the restype is None, then those doctest's work: they print
nothing.

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top