Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

void* and char* conversion #65

Open
JulianS-Uni opened this issue Dec 1, 2019 · 3 comments
Open

void* and char* conversion #65

JulianS-Uni opened this issue Dec 1, 2019 · 3 comments

Comments

@JulianS-Uni
Copy link

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
@trolldbois
Copy link
Owner

In short, it's due to trying to handle cross-architecture variable pointer size

@trolldbois
Copy link
Owner

Potential TODO also: if no -target, just remove the POINTER_T template from generation

@trolldbois
Copy link
Owner

Improved a bit in HEAD. Still work to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants