[issue47164] [C API] Add private "CAST" macros to clean up casts in C code
STINNER Victor
report at bugs.python.org
Thu Mar 31 03:27:18 EDT 2022
STINNER Victor <vstinner at python.org> added the comment:
After reading Mark's comments, I reworked my GH-32190 PR to only use the CAST macros in other macros, not in the C code. The CAST macros are not used in such code pattern:
else if (PyCFunction_Check(func))
- return ((PyCFunctionObject*)func)->m_ml->ml_name;
+ return _PyCFunctionObject_CAST(func)->m_ml->ml_name;
In fact, this change doesn't bring any value.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47164>
_______________________________________
More information about the Python-bugs-list
mailing list