]> granicus.if.org Git - python/commit
bpo-32030: Add _PyPathConfig_ComputeArgv0() (#4845)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 13 Dec 2017 20:05:57 +0000 (21:05 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2017 20:05:57 +0000 (21:05 +0100)
commit11a247df88f15b51feff8a3c46005676bb29b96e
treec78bc87a6117fbac9856e1eb77a209862f70d4c3
parenta70232f28882d2fecb3ebe06643867701016070f
bpo-32030: Add _PyPathConfig_ComputeArgv0() (#4845)

Changes:

* Split _PySys_SetArgvWithError() into subfunctions for Py_Main():

  * Create the Python list object
  * Set sys.argv to the list
  * Compute argv0
  * Prepend argv0 to sys.path

* Add _PyPathConfig_ComputeArgv0()
* Remove _PySys_SetArgvWithError()
* Py_Main() now splits the code to compute sys.argv/path0 and the
  code to update the sys module: add pymain_compute_argv()
  subfunction.
Include/pylifecycle.h
Include/sysmodule.h
Modules/main.c
Python/pathconfig.c
Python/sysmodule.c