Skip to content

Commit 3e8f962

Browse files
AJNeufeldserhiy-storchaka
authored andcommitted
bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620)
1 parent 9a8d1d7 commit 3e8f962

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
@@ -12,7 +12,9 @@ extern "C" {
1212
PyAPI_FUNC(void) Py_Initialize(void);
1313
PyAPI_FUNC(void) Py_InitializeEx(int);
1414
PyAPI_FUNC(void) Py_Finalize(void);
15+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
1516
PyAPI_FUNC(int) Py_FinalizeEx(void);
17+
#endif
1618
PyAPI_FUNC(int) Py_IsInitialized(void);
1719

1820
/* 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)