ctypeslib
ctypeslib copied to clipboard
void* and char* conversion
When doing typedefs in C like those:
typedef char* PCHAR;
typedef void* PVOID;
clang2py creates following ctypes:
PCHAR = POINTER_T(ctypes.c_char)
PVOID = POINTER_T(None)
shouldn't it be this:
PCHAR = ctypes.c_char_p
PVOID = ctypes.c_void_p
In short, it's due to trying to handle cross-architecture variable pointer size
Potential TODO also: if no -target, just remove the POINTER_T template from generation
Improved a bit in HEAD. Still work to do