Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Mar 31, 2022

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

https://bugs.python.org/issue47164

@arhadthedev
Copy link
Member

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

@vstinner
Copy link
MemberAuthor

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).
@vstinnervstinner marked this pull request as ready for review May 3, 2022 17:53
@vstinner
Copy link
MemberAuthor

I rebased my PR.

@vstinner
Copy link
MemberAuthor

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__}, 

@vstinnervstinner merged commit b270b82 into python:mainMay 3, 2022
@vstinnervstinner deleted the clinic_cfunc_cast branch May 3, 2022 18:25
Sign up for freeto 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.

5 participants

@vstinner@arhadthedev@serhiy-storchaka@the-knights-who-say-ni@bedevere-bot