Skip to content

Commit 715b677

Browse files
miss-islingtonCAM-Gerlach
authored andcommitted
gh-95914: Add What's New item describing PEP 670 changes (GH-98315)
(cherry picked from commit aafc53c) Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent fc12762 commit 715b677

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
@@ -1897,6 +1897,17 @@ New Features
18971897
Porting to Python 3.11
18981898
----------------------
18991899

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

0 commit comments

Comments
 (0)