[Python-checkins] bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) (GH-11269)

Ned Deily webhook-mailer at python.org
Thu Dec 20 16:52:15 EST 2018


https://github.com/python/cpython/commit/5241ecff161ccf34083b6a824d1ae6d79917d889
commit: 5241ecff161ccf34083b6a824d1ae6d79917d889
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ned Deily <nad at python.org>
date: 2018-12-20T16:52:09-05:00
summary:

bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) (GH-11269)

(cherry picked from commit 3e8f962e63c2f929604443531a9a3aced242f3e8)

Co-authored-by: Arthur Neufeld <aneufeld at seinesoftware.ca>

files:
A Misc/NEWS.d/next/C API/2018-11-22-13-52-36.bpo-35259.p07c61.rst
M Include/pylifecycle.h

diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 01abfa9fcd6f..9a528218e481 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -27,7 +27,9 @@ PyAPI_FUNC(void) Py_InitializeEx(int);
 PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
 #endif
 PyAPI_FUNC(void) Py_Finalize(void);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
 PyAPI_FUNC(int) Py_FinalizeEx(void);
+#endif
 PyAPI_FUNC(int) Py_IsInitialized(void);
 PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
 PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
diff --git a/Misc/NEWS.d/next/C API/2018-11-22-13-52-36.bpo-35259.p07c61.rst b/Misc/NEWS.d/next/C API/2018-11-22-13-52-36.bpo-35259.p07c61.rst
new file mode 100644
index 000000000000..1f4801cbfb71
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2018-11-22-13-52-36.bpo-35259.p07c61.rst	
@@ -0,0 +1,2 @@
+Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) based on
+Py_LIMITED_API. Patch by Arthur Neufeld.



More information about the Python-checkins mailing list