gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994)

This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all. This PR does not address the broader concerns from gh-109853.
This commit is contained in:
Eric Snow 2023-10-02 13:59:05 -06:00 committed by GitHub
parent fc2cb86d21
commit a040a32ea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 214 additions and 10 deletions

View file

@ -204,6 +204,9 @@ typedef struct PyConfig {
wchar_t *run_module;
wchar_t *run_filename;
/* --- Set by Py_Main() -------------------------- */
wchar_t *sys_path_0;
/* --- Private fields ---------------------------- */
// Install importlib? If equals to 0, importlib is not initialized at all.