Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Mar 30, 2022

Add _PyCFunctionObject_CAST() and _PyCMethodObject_CAST() macros to
make macros casting their argument easier to read, but also to check
the type of their input in debug mode: assert(PyCFunction_Check(func)
and assert(PyCMethod_Check(func).

Reformat also PyCFunction_XXX() macros for readability.

https://bugs.python.org/issue47164

@vstinnervstinner changed the title bpo-47164: Add _PyCFunction_CAST() macrobpo-47164: Add _PyCFunctionObject_CAST() macroMar 30, 2022
Add _PyCFunctionObject_CAST() and _PyCMethodObject_CAST() macros to make macros casting their argument easier to read, but also to check the type of their input in debug mode: assert(PyCFunction_Check(func) and assert(PyCMethod_Check(func). Reformat also PyCFunction_XXX() macros for readability.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@the-knights-who-say-ni@bedevere-bot