summaryrefslogtreecommitdiffstats
path: root/Python/getopt.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-17 01:15:12 (GMT)
committerGitHub <noreply@github.com>2019-05-17 01:15:12 (GMT)
commit870b035bc6da96689b59dd6f79782ec6f1873617 (patch)
tree27cb244d3d66b133808ca5c04ec14f82d64f078c /Python/getopt.c
parentaee19f54f6fe45f6b3c906987941e5a8af4468e9 (diff)
downloadcpython-870b035bc6da96689b59dd6f79782ec6f1873617.zip
cpython-870b035bc6da96689b59dd6f79782ec6f1873617.tar.gz
cpython-870b035bc6da96689b59dd6f79782ec6f1873617.tar.bz2
bpo-36763: Cleanup precmdline in _PyCoreConfig_Read() (GH-13371)
precmdline is only needed in _PyCoreConfig_Read(), not in config_read_cmdline(). Reorganize _PyCoreConfig_Read().
Diffstat (limited to 'Python/getopt.c')
-rw-r--r--Python/getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/getopt.c b/Python/getopt.c
index 10bd1d4..1a7db3f 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -41,7 +41,7 @@ int _PyOS_opterr = 1; /* generate error messages */
Py_ssize_t _PyOS_optind = 1; /* index into argv array */
const wchar_t *_PyOS_optarg = NULL; /* optional argument */
-static wchar_t *opt_ptr = L"";
+static const wchar_t *opt_ptr = L"";
/* Python command line short and long options */
@@ -61,7 +61,7 @@ void _PyOS_ResetGetOpt(void)
opt_ptr = L"";
}
-int _PyOS_GetOpt(Py_ssize_t argc, wchar_t **argv, int *longindex)
+int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex)
{
wchar_t *ptr;
wchar_t option;