From e2f92de6a90ae11a6d8e01bd17fd88b005516835 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 11 Nov 2017 13:06:26 +0200 Subject: Add the const qualifier to "char *" variables that refer to literal strings. (#4370) --- Objects/complexobject.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Objects/complexobject.c') diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 3bf37ee437..4bcf2cefd8 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 -- cgit v1.2.1