mirror of
https://github.com/python/cpython
synced 2026-09-29 09:50:29 +03:00
Add the const qualifier to "char *" variables that refer to literal strings. (#4370)
This commit is contained in:
parent
e184cfd7bf
commit
e2f92de6a9
23 changed files with 46 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue