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

bpo-47164: Argument Clinic uses _PyCFunction_CAST() #32210

Merged
merged 1 commit into from May 3, 2022

Conversation

Copy link
Member

@vstinner vstinner commented Mar 31, 2022

Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).

https://bugs.python.org/issue47164

@arhadthedev
Copy link

@arhadthedev arhadthedev commented Mar 31, 2022

What to do with yet unmerged PRs that add Argument Clinic stuff (like #32010)? They'll introduce more (PyCFunction)(void(*)(void)).

@vstinner
Copy link
Author

@vstinner vstinner commented Mar 31, 2022

You should ignore this draft PR for now. I'm still thinking about it :-) If there will be a conflict, I will simply regenerate this PR (rerun make clinic).

Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
@vstinner vstinner marked this pull request as ready for review May 3, 2022
@vstinner
Copy link
Author

@vstinner vstinner commented May 3, 2022

I rebased my PR.

@vstinner
Copy link
Author

@vstinner vstinner commented May 3, 2022

Example of change:

-    {"test_object_converter", (PyCFunction)(void(*)(void))test_object_converter, METH_FASTCALL, test_object_converter__doc__},
+    {"test_object_converter", _PyCFunction_CAST(test_object_converter), METH_FASTCALL, test_object_converter__doc__},

@vstinner vstinner merged commit b270b82 into python:main May 3, 2022
13 checks passed
@vstinner vstinner deleted the clinic_cfunc_cast branch May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants