mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) (gh-110701)
This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all.
This change does not address the broader concerns from gh-109853.
(cherry-picked from commit a040a32ea2)
This commit is contained in:
parent
592a849fdf
commit
313554457e
7 changed files with 26702 additions and 26487 deletions
|
|
@ -524,6 +524,10 @@ _PyRuntimeState_Fini(_PyRuntimeState *runtime)
|
|||
}
|
||||
|
||||
#undef FREE_LOCK
|
||||
if (runtime->sys_path_0 != NULL) {
|
||||
PyMem_RawFree(runtime->sys_path_0);
|
||||
runtime->sys_path_0 = NULL;
|
||||
}
|
||||
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue