summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-15 17:46:50 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-15 17:46:50 (GMT)
commitbc760d9f4572c1f2356f7444d8cd3aa01f7fad38 (patch)
treef0b7b49d3b9caf8670b24ae43765004f033e9b08 /Objects/bytesobject.c
parent00d5f35b85f4ef9a1cdfff1c2f4d77792e06320c (diff)
downloadcpython-bc760d9f4572c1f2356f7444d8cd3aa01f7fad38.zip
cpython-bc760d9f4572c1f2356f7444d8cd3aa01f7fad38.tar.gz
cpython-bc760d9f4572c1f2356f7444d8cd3aa01f7fad38.tar.bz2
Merged revisions 84070,84074 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84070 | antoine.pitrou | 2010-08-15 19:12:55 +0200 (dim., 15 août 2010) | 5 lines Fix some compilation warnings under 64-bit Windows (issue #9566). Some of these are genuine bugs with objects bigger than 2GB, but my system doesn't allow me to write tests for it. ........ r84074 | antoine.pitrou | 2010-08-15 19:41:31 +0200 (dim., 15 août 2010) | 3 lines Fix (harmless) warning with MSVC. ........
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 0f7e7d3..e580884 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -791,7 +791,7 @@ bytes_contains(PyObject *self, PyObject *arg)
Py_ssize_t ival = PyNumber_AsSsize_t(arg, PyExc_ValueError);
if (ival == -1 && PyErr_Occurred()) {
Py_buffer varg;
- int pos;
+ Py_ssize_t pos;
PyErr_Clear();
if (_getbuffer(arg, &varg) < 0)
return -1;
@@ -805,7 +805,7 @@ bytes_contains(PyObject *self, PyObject *arg)
return -1;
}
- return memchr(PyBytes_AS_STRING(self), ival, Py_SIZE(self)) != NULL;
+ return memchr(PyBytes_AS_STRING(self), (int) ival, Py_SIZE(self)) != NULL;
}
static PyObject *
@@ -1980,7 +1980,7 @@ return_self(PyBytesObject *self)
}
Py_LOCAL_INLINE(Py_ssize_t)
-countchar(const char *target, int target_len, char c, Py_ssize_t maxcount)
+countchar(const char *target, Py_ssize_t target_len, char c, Py_ssize_t maxcount)
{
Py_ssize_t count=0;
const char *start=target;
@@ -3039,7 +3039,7 @@ PyBytes_FromObject(PyObject *x)
if (_PyBytes_Resize(&new, size) < 0)
goto error;
}
- ((PyBytesObject *)new)->ob_sval[i] = value;
+ ((PyBytesObject *)new)->ob_sval[i] = (char) value;
}
_PyBytes_Resize(&new, i);