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.
........
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 4878d83..670f589 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1215,7 +1215,7 @@
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;
@@ -1229,7 +1229,7 @@
return -1;
}
- return memchr(PyByteArray_AS_STRING(self), ival, Py_SIZE(self)) != NULL;
+ return memchr(PyByteArray_AS_STRING(self), (int) ival, Py_SIZE(self)) != NULL;
}