diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-12-12 13:55:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 13:55:04 +0200 |
commit | 4ae06c5337e01bdde28bce57b6b9166ad50947e3 (patch) | |
tree | 5e9e92f616bc452eb4096b56ea373fa8b46d2510 /Python/sysmodule.c | |
parent | 5ce0a2a100909104836f53a2c8823006ec46f8ad (diff) | |
download | cpython-git-4ae06c5337e01bdde28bce57b6b9166ad50947e3.tar.gz |
bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index eeeaa7240e..f10099b523 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -100,7 +100,7 @@ static PyObject * sys_breakpointhook(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *keywords) { assert(!PyErr_Occurred()); - char *envar = Py_GETENV("PYTHONBREAKPOINT"); + const char *envar = Py_GETENV("PYTHONBREAKPOINT"); if (envar == NULL || strlen(envar) == 0) { envar = "pdb.set_trace"; @@ -109,8 +109,8 @@ sys_breakpointhook(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject * /* The breakpoint is explicitly no-op'd. */ Py_RETURN_NONE; } - char *last_dot = strrchr(envar, '.'); - char *attrname = NULL; + const char *last_dot = strrchr(envar, '.'); + const char *attrname = NULL; PyObject *modulepath = NULL; if (last_dot == NULL) { |