gh-117987: Restore several functions removed in Python 3.13 alpha 1 (GH-117993)

Restore these functions removed in Python 3.13 alpha 1:

* Py_SetPythonHome()
* Py_SetProgramName()
* PySys_SetArgvEx()
* PySys_SetArgv()
This commit is contained in:
Victor Stinner 2024-04-18 15:20:38 +02:00 committed by GitHub
parent 0a0756c5ed
commit 340a02b590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 163 additions and 18 deletions

View file

@ -251,8 +251,7 @@ Py_SetPath(const wchar_t *path)
}
// Removed in Python 3.13 API, but kept for the stable ABI
PyAPI_FUNC(void)
void
Py_SetPythonHome(const wchar_t *home)
{
int has_value = home && home[0];
@ -275,8 +274,7 @@ Py_SetPythonHome(const wchar_t *home)
}
// Removed in Python 3.13 API, but kept for the stable ABI
PyAPI_FUNC(void)
void
Py_SetProgramName(const wchar_t *program_name)
{
int has_value = program_name && program_name[0];