Skip to content

Commit b5c7b38

Browse files
authored
bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730)
Export the Py_FrozenMain() function: fix a Python 3.9.0 regression. Python 3.9 uses -fvisibility=hidden and the function was not exported explicitly and so not exported. Add also Py_FrozenMain to the stable ABI on Windows.
1 parent 7cf0aad commit b5c7b38

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

‎Include/pylifecycle.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
3232
/* Bootstrap __main__ (defined in Modules/main.c) */
3333
PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
3434

35+
PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
36+
3537
PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
3638

3739
/* In pathconfig.c */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 regression.
2+
Python 3.9 uses ``-fvisibility=hidden`` and the function was not exported
3+
explicitly and so not exported.

‎PC/python3dll.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ EXPORT_FUNC(Py_Exit)
4949
EXPORT_FUNC(Py_FatalError)
5050
EXPORT_FUNC(Py_Finalize)
5151
EXPORT_FUNC(Py_FinalizeEx)
52+
EXPORT_FUNC(Py_FrozenMain)
5253
EXPORT_FUNC(Py_GenericAlias)
5354
EXPORT_FUNC(Py_GenericAliasType)
5455
EXPORT_FUNC(Py_GetArgcArgv)

0 commit comments

Comments
 (0)