Skip to content

bpo-38835: Exclude PyFPE macros from the stable API #17228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ Build and C API Changes
and refers to a constant string.
(Contributed by Serhiy Storchaka in :issue:`38650`.)

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


Deprecated
==========
Expand Down
3 changes: 3 additions & 0 deletions Include/pyfpe.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#ifndef Py_PYFPE_H
#define Py_PYFPE_H
/* Header excluded from the stable API */
#ifndef Py_LIMITED_API

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

#endif /* !defined(Py_LIMITED_API) */
#endif /* !Py_PYFPE_H */
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Exclude ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of
``pyfpe.h`` from ``Py_LIMITED_API`` (stable API).