mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.
This commit is contained in:
parent
1d0aaea54a
commit
0010d37a43
2 changed files with 8 additions and 8 deletions
|
@ -1214,7 +1214,7 @@ bytearray_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;
|
||||
|
@ -1228,7 +1228,7 @@ bytearray_contains(PyObject *self, PyObject *arg)
|
|||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue