Skip to content

Commit 5241ecf

Browse files
miss-islingtonAJNeufeld
authored andcommitted
bpo-35259: Limit Py_FinalizeEx() to Py_LIMITED_API >= 0x03060000. (GH-10620) (GH-11269)
(cherry picked from commit 3e8f962) Co-authored-by: Arthur Neufeld <[email protected]>
1 parent 3a26b59 commit 5241ecf

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
@@ -27,7 +27,9 @@ PyAPI_FUNC(void) Py_InitializeEx(int);
2727
PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
2828
#endif
2929
PyAPI_FUNC(void) Py_Finalize(void);
30+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
3031
PyAPI_FUNC(int) Py_FinalizeEx(void);
32+
#endif
3133
PyAPI_FUNC(int) Py_IsInitialized(void);
3234
PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
3335
PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
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)