summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorC.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>2022-10-17 19:16:37 (GMT)
committerGitHub <noreply@github.com>2022-10-17 19:16:37 (GMT)
commitaafc53c0a6d1450dcfbc3f994318025ffb49ce73 (patch)
tree46bdd7468035b2df3b525b5b7aeba0c153eb1deb /Doc
parent0f156c1c5642d3102317e6b4c315098226e6e3ff (diff)
downloadcpython-aafc53c0a6d1450dcfbc3f994318025ffb49ce73.zip
cpython-aafc53c0a6d1450dcfbc3f994318025ffb49ce73.tar.gz
cpython-aafc53c0a6d1450dcfbc3f994318025ffb49ce73.tar.bz2
gh-95914: Add What's New item describing PEP 670 changes (#98315)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.11.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 73e23a1..1e93fca 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1895,6 +1895,17 @@ New Features
Porting to Python 3.11
----------------------
+* Some macros have been converted to static inline functions to avoid
+ `macro pitfalls <https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_.
+ The change should be mostly transparent to users,
+ as the replacement functions will cast their arguments to the expected types
+ to avoid compiler warnings due to static type checks.
+ However, when the limited C API is set to >=3.11,
+ these casts are not done,
+ and callers will need to cast arguments to their expected types.
+ See :pep:`670` for more details.
+ (Contributed by Victor Stinner and Erlend E. Aasland in :gh:`89653`.)
+
* :c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback``
arguments, the interpreter now derives those values from the exception
instance (the ``value`` argument). The function still steals references