summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-29 22:49:03 (GMT)
committerGitHub <noreply@github.com>2020-06-29 22:49:03 (GMT)
commitdd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 (patch)
treee313d1898cff674146bfb1fef17f082f56628ed4 /Include
parent2fb5f038f2a2e91a7293d62dfd5601e6eb500c55 (diff)
downloadcpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.zip
cpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.tar.gz
cpython-dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0.tar.bz2
bpo-23427: Add sys.orig_argv attribute (GH-20729)
Add sys.orig_argv attribute: the list of the original command line arguments passed to the Python executable. Rename also PyConfig._orig_argv to PyConfig.orig_argv and document it.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/initconfig.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h
index 5b05eab..bbe8387 100644
--- a/Include/cpython/initconfig.h
+++ b/Include/cpython/initconfig.h
@@ -408,13 +408,15 @@ typedef struct {
Default: 0. */
int _isolated_interpreter;
- /* Original command line arguments. If _orig_argv is empty and _argv is
- not equal to [''], PyConfig_Read() copies the configuration 'argv' list
- into '_orig_argv' list before modifying 'argv' list (if parse_argv
- is non-zero).
+ /* The list of the original command line arguments passed to the Python
+ executable.
+
+ If 'orig_argv' list is empty and 'argv' is not a list only containing an
+ empty string, PyConfig_Read() copies 'argv' into 'orig_argv' before
+ modifying 'argv' (if 'parse_argv is non-zero).
_PyConfig_Write() initializes Py_GetArgcArgv() to this list. */
- PyWideStringList _orig_argv;
+ PyWideStringList orig_argv;
} PyConfig;
PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
@@ -445,7 +447,7 @@ PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
/* Get the original command line arguments, before Python modified them.
- See also PyConfig._orig_argv. */
+ See also PyConfig.orig_argv. */
PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
#endif /* !Py_LIMITED_API */