diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-11 11:06:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-11 11:06:26 (GMT) |
commit | e2f92de6a90ae11a6d8e01bd17fd88b005516835 (patch) | |
tree | a5bc255a98f488e5ecf195dc3f55665e9afecc47 /Objects/complexobject.c | |
parent | e184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 (diff) | |
download | cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.zip cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.gz cpython-e2f92de6a90ae11a6d8e01bd17fd88b005516835.tar.bz2 |
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
Diffstat (limited to 'Objects/complexobject.c')
-rw-r--r-- | Objects/complexobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 3bf37ee..4bcf2ce 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -363,9 +363,9 @@ complex_repr(PyComplexObject *v) /* These do not need to be freed. re is either an alias for pre or a pointer to a constant. lead and tail are pointers to constants. */ - char *re = NULL; - char *lead = ""; - char *tail = ""; + const char *re = NULL; + const char *lead = ""; + const char *tail = ""; if (v->cval.real == 0. && copysign(1.0, v->cval.real)==1.0) { /* Real part is +0: just output the imaginary part and do not |