Issue #25923: Added more const qualifiers to signatures of static and private functions.

This commit is contained in:
Serhiy Storchaka 2015-12-25 20:01:53 +02:00
parent 2d06e84455
commit ef1585eb9a
60 changed files with 210 additions and 191 deletions

View file

@ -2576,8 +2576,8 @@ bytearray_remove_impl(PyByteArrayObject *self, int value)
/* XXX These two helpers could be optimized if argsize == 1 */
static Py_ssize_t
lstrip_helper(char *myptr, Py_ssize_t mysize,
void *argptr, Py_ssize_t argsize)
lstrip_helper(const char *myptr, Py_ssize_t mysize,
const void *argptr, Py_ssize_t argsize)
{
Py_ssize_t i = 0;
while (i < mysize && memchr(argptr, (unsigned char) myptr[i], argsize))
@ -2586,8 +2586,8 @@ lstrip_helper(char *myptr, Py_ssize_t mysize,
}
static Py_ssize_t
rstrip_helper(char *myptr, Py_ssize_t mysize,
void *argptr, Py_ssize_t argsize)
rstrip_helper(const char *myptr, Py_ssize_t mysize,
const void *argptr, Py_ssize_t argsize)
{
Py_ssize_t i = mysize - 1;
while (i >= 0 && memchr(argptr, (unsigned char) myptr[i], argsize))