summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-10-05 19:24:10 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-10-05 19:24:10 (GMT)
commit5b720753872ff522a19fcc9ba6181caf785df2f1 (patch)
treedcc77f47dc651ba3154c309ddf5947d96adbe4d6 /Objects
parent5df8a8a1fd6cc6f4469dc7d3994d06e2aea24c52 (diff)
downloadcpython-5b720753872ff522a19fcc9ba6181caf785df2f1.zip
cpython-5b720753872ff522a19fcc9ba6181caf785df2f1.tar.gz
cpython-5b720753872ff522a19fcc9ba6181caf785df2f1.tar.bz2
Hopefully fix Windows compilation error following 499a96611baa
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytearrayobject.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index c0f0819..2358e05 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2431,21 +2431,21 @@ bytearray_remove(PyByteArrayObject *self, PyObject *arg)
/* XXX These two helpers could be optimized if argsize == 1 */
static Py_ssize_t
-lstrip_helper(unsigned char *myptr, Py_ssize_t mysize,
+lstrip_helper(char *myptr, Py_ssize_t mysize,
void *argptr, Py_ssize_t argsize)
{
Py_ssize_t i = 0;
- while (i < mysize && memchr(argptr, myptr[i], argsize))
+ while (i < mysize && memchr(argptr, (unsigned char) myptr[i], argsize))
i++;
return i;
}
static Py_ssize_t
-rstrip_helper(unsigned char *myptr, Py_ssize_t mysize,
+rstrip_helper(char *myptr, Py_ssize_t mysize,
void *argptr, Py_ssize_t argsize)
{
Py_ssize_t i = mysize - 1;
- while (i >= 0 && memchr(argptr, myptr[i], argsize))
+ while (i >= 0 && memchr(argptr, (unsigned char) myptr[i], argsize))
i--;
return i + 1;
}
@@ -2460,7 +2460,7 @@ static PyObject *
bytearray_strip(PyByteArrayObject *self, PyObject *args)
{
Py_ssize_t left, right, mysize, argsize;
- void *myptr, *argptr;
+ char *myptr, *argptr;
PyObject *arg = Py_None;
Py_buffer varg;
if (!PyArg_ParseTuple(args, "|O:strip", &arg))
@@ -2472,7 +2472,7 @@ bytearray_strip(PyByteArrayObject *self, PyObject *args)
else {
if (_getbuffer(arg, &varg) < 0)
return NULL;
- argptr = varg.buf;
+ argptr = (char *) varg.buf;
argsize = varg.len;
}
myptr = PyByteArray_AS_STRING(self);
@@ -2497,7 +2497,7 @@ static PyObject *
bytearray_lstrip(PyByteArrayObject *self, PyObject *args)
{
Py_ssize_t left, right, mysize, argsize;
- void *myptr, *argptr;
+ char *myptr, *argptr;
PyObject *arg = Py_None;
Py_buffer varg;
if (!PyArg_ParseTuple(args, "|O:lstrip", &arg))
@@ -2509,7 +2509,7 @@ bytearray_lstrip(PyByteArrayObject *self, PyObject *args)
else {
if (_getbuffer(arg, &varg) < 0)
return NULL;
- argptr = varg.buf;
+ argptr = (char *) varg.buf;
argsize = varg.len;
}
myptr = PyByteArray_AS_STRING(self);
@@ -2531,7 +2531,7 @@ static PyObject *
bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
{
Py_ssize_t right, mysize, argsize;
- void *myptr, *argptr;
+ char *myptr, *argptr;
PyObject *arg = Py_None;
Py_buffer varg;
if (!PyArg_ParseTuple(args, "|O:rstrip", &arg))
@@ -2543,7 +2543,7 @@ bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
else {
if (_getbuffer(arg, &varg) < 0)
return NULL;
- argptr = varg.buf;
+ argptr = (char *) varg.buf;
argsize = varg.len;
}
myptr = PyByteArray_AS_STRING(self);