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

PyThreadState_SetAsyncExc c type mismatch #419

Closed
FinnLidbetter opened this issue Sep 12, 2021 · 0 comments
Closed

PyThreadState_SetAsyncExc c type mismatch #419

FinnLidbetter opened this issue Sep 12, 2021 · 0 comments

Comments

@FinnLidbetter
Copy link
Contributor

In the threading.py module the ctypes.pythonapi.PyThreadState_SetAsyncExc function is passed a thread_id argument as a ctypes.c_long object. However, it looks like since python3.7 the type of this argument should be ctypes.c_ulong. See https://docs.python.org/3/c-api/init.html#c.PyThreadState_SetAsyncExc

I have not encountered this causing a problem yet, but if I am not mistaken it looks like it could be a bug when using python3.7 and beyond.

I can submit a PR for this to condition the ctype on the python version.

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

No branches or pull requests

1 participant