]> granicus.if.org Git - python/commitdiff
bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620)
authorArthur Neufeld <aneufeld@seinesoftware.ca>
Thu, 20 Dec 2018 21:11:03 +0000 (15:11 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 20 Dec 2018 21:11:03 +0000 (23:11 +0200)
Include/pylifecycle.h
Misc/NEWS.d/next/C API/2018-11-22-13-52-36.bpo-35259.p07c61.rst [new file with mode: 0644]

index 5419bc943240372090c583e7e08fff61046ff0d9..1df114a73de3b4466ed5a25d406d72b3e7588004 100644 (file)
@@ -12,7 +12,9 @@ extern "C" {
 PyAPI_FUNC(void) Py_Initialize(void);
 PyAPI_FUNC(void) Py_InitializeEx(int);
 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);
 
 /* Subinterpreter support */
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 (file)
index 0000000..1f4801c
--- /dev/null
@@ -0,0 +1,2 @@
+Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) based on
+Py_LIMITED_API. Patch by Arthur Neufeld.