]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Somebody started playing with const, so of course the outcome
authorTim Peters <tim.peters@gmail.com>
Sun, 9 Jul 2000 08:02:21 +0000 (08:02 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 9 Jul 2000 08:02:21 +0000 (08:02 +0000)
commitc2e7da9859c54b91b0cb8e20e91be60437a765f6
treeea42e94469124a553ac4a52ab340e989d1dd08db
parentba09633e1e644720087d49e68555f630e905ba49
Somebody started playing with const, so of course the outcome
was cascades of warnings about mismatching const decls.  Overall,
I think const creates lots of headaches and solves almost
nothing.  Added enough consts to shut up the warnings, but
this did require casting away const in one spot too (another
usual outcome of starting down this path):  the function
mymemreplace can't return const char*, but sometimes wants to
return its first argument as-is, which latter must be declared
const char* in order to avoid const warnings at mymemreplace's
call sites.  So, in the case the function wants to return the
first arg, that arg's declared constness must be subverted.
Objects/stringobject.c