ctypes question

Brendan Miller catphive at catphive.net
Wed Apr 14 14:09:39 EDT 2010


I'm using python 2.5.2.

I have a ctypes function with argtypes like this:

_create_folder.argyptes = [c_void_p, c_int]

The issue I am having is that I can call it like this

_create_folder(some_pointer, "asdf")

and it won't raise a TypeError. Why would it accept a string for an
integer argument?

I didn't see this behavior documented when I read through
http://docs.python.org/library/ctypes.html, maybe I'm just missing
it... if that's the case a reference would be appreciated.

Brendan



More information about the Python-list mailing list