mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Issue #19512: add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects Add also more identifiers in pythonrun.c to avoid temporary Unicode string objets for the interactive interpreter.
This commit is contained in:
parent
bb52020d44
commit
090543736f
13 changed files with 72 additions and 49 deletions
|
@ -261,7 +261,7 @@ RunMainFromImporter(wchar_t *filename)
|
|||
|
||||
/* argv0 is usable as an import source, so put it in sys.path[0]
|
||||
and import __main__ */
|
||||
sys_path = PySys_GetObject("path");
|
||||
sys_path = _PySys_GetObjectId(&_PyId_path);
|
||||
if (sys_path == NULL) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "unable to get sys.path");
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue