Skip to content

Commit 488d02a

Browse files
authored
bpo-38835: Exclude PyFPE macros from the stable API (GH-17228)
Exclude PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros of pyfpe.h from Py_LIMITED_API (stable API).
1 parent e7e699e commit 488d02a

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Doc/whatsnew/3.9.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ Build and C API Changes
226226
and refers to a constant string.
227227
(Contributed by Serhiy Storchaka in :issue:`38650`.)
228228

229+
* Exclude ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of
230+
``pyfpe.h`` from ``Py_LIMITED_API`` (stable API).
231+
(Contributed by Victor Stinner in :issue:`38835`.)
232+
229233

230234
Deprecated
231235
==========

Include/pyfpe.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#ifndef Py_PYFPE_H
22
#define Py_PYFPE_H
3+
/* Header excluded from the stable API */
4+
#ifndef Py_LIMITED_API
35

46
/* These macros used to do something when Python was built with --with-fpectl,
57
* but support for that was dropped in 3.7. We continue to define them though,
@@ -9,4 +11,5 @@
911
#define PyFPE_START_PROTECT(err_string, leave_stmt)
1012
#define PyFPE_END_PROTECT(v)
1113

14+
#endif /* !defined(Py_LIMITED_API) */
1215
#endif /* !Py_PYFPE_H */
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Exclude ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of
2+
``pyfpe.h`` from ``Py_LIMITED_API`` (stable API).

0 commit comments

Comments
 (0)