Skip to content

Commit 284511a

Browse files
CAM-Gerlachmiss-islington
authored andcommitted
pythongh-95914: Add What's New item describing PEP 670 changes (pythonGH-98315)
(cherry picked from commit aafc53c) Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent 211b819 commit 284511a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Doc/whatsnew/3.11.rst

+11
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,17 @@ New Features
18991899
Porting to Python 3.11
19001900
----------------------
19011901

1902+
* Some macros have been converted to static inline functions to avoid
1903+
`macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_.
1904+
The change should be mostly transparent to users,
1905+
as the replacement functions will cast their arguments to the expected types
1906+
to avoid compiler warnings due to static type checks.
1907+
However, when the limited C API is set to >=3.11,
1908+
these casts are not done,
1909+
and callers will need to cast arguments to their expected types.
1910+
See :pep:`670` for more details.
1911+
(Contributed by Victor Stinner and Erlend E. Aasland in :gh:`89653`.)
1912+
19021913
* :c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback``
19031914
arguments, the interpreter now derives those values from the exception
19041915
instance (the ``value`` argument). The function still steals references

0 commit comments

Comments
 (0)