]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730)
authorVictor Stinner <vstinner@python.org>
Thu, 10 Dec 2020 17:39:17 +0000 (18:39 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Dec 2020 17:39:17 +0000 (18:39 +0100)
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.

Include/pylifecycle.h
Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst [new file with mode: 0644]
PC/python3dll.c

index c5368b3c5edaa08c7db2ca2f30d291127e1839d8..783fcb455eb5289eeb1babca79b99ceb32cdd5bd 100644 (file)
@@ -32,6 +32,8 @@ PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
 /* Bootstrap __main__ (defined in Modules/main.c) */
 PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
 
+PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
+
 PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
 
 /* In pathconfig.c */
diff --git a/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst b/Misc/NEWS.d/next/C API/2020-12-10-10-43-03.bpo-42591.CXNY8G.rst
new file mode 100644 (file)
index 0000000..3519859
--- /dev/null
@@ -0,0 +1,3 @@
+Export the :c:func:`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.
index 27cc315de2dd1996caf0943c04690ba1b8aa0f9a..9eb81e36af0013e05ce61469f9129ba51c8aa1a0 100644 (file)
@@ -49,6 +49,7 @@ EXPORT_FUNC(Py_Exit)
 EXPORT_FUNC(Py_FatalError)
 EXPORT_FUNC(Py_Finalize)
 EXPORT_FUNC(Py_FinalizeEx)
+EXPORT_FUNC(Py_FrozenMain)
 EXPORT_FUNC(Py_GenericAlias)
 EXPORT_FUNC(Py_GenericAliasType)
 EXPORT_FUNC(Py_GetArgcArgv)