Skip to content

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

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:clinic_cfunc_cast
May 3, 2022
Merged

bpo-47164: Argument Clinic uses _PyCFunction_CAST()#32210
vstinner merged 1 commit into
python:mainfrom
vstinner:clinic_cfunc_cast

Conversation

@vstinner

@vstinnervstinner commented Mar 31, 2022

Copy link
Copy Markdown
Member

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

https://bugs.python.org/issue47164

@arhadthedev

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

Copy link
Copy Markdown
MemberAuthor

I rebased my PR.

@vstinner

Copy link
Copy Markdown
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__},

@vstinner
vstinner merged commit b270b82 into python:mainMay 3, 2022
@vstinner
vstinner 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