Skip to content

Commit d1e7175

Browse files
bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620)
(cherry picked from commit 3e8f962) Co-authored-by: Arthur Neufeld <aneufeld@seinesoftware.ca>
1 parent c7b7a43 commit d1e7175

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Include/pylifecycle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ PyAPI_FUNC(void) Py_InitializeEx(int);
9999
PyAPI_FUNC(void) _Py_FatalInitError(_PyInitError err) _Py_NO_RETURN;
100100
#endif
101101
PyAPI_FUNC(void) Py_Finalize(void);
102+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
102103
PyAPI_FUNC(int) Py_FinalizeEx(void);
104+
#endif
103105
PyAPI_FUNC(int) Py_IsInitialized(void);
104106

105107
/* Subinterpreter support */
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) based on
2+
Py_LIMITED_API. Patch by Arthur Neufeld.

0 commit comments

Comments
 (0)