mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Use an unsigned cast to avoid a warning in VC++.
This commit is contained in:
parent
8f0fa9e47f
commit
481ac8811e
1 changed files with 2 additions and 1 deletions
|
@ -939,7 +939,8 @@ array_fromfile(self, args)
|
||||||
size_t newbytes;
|
size_t newbytes;
|
||||||
/* Be careful here about overflow */
|
/* Be careful here about overflow */
|
||||||
if ((newlength = self->ob_size + n) <= 0 ||
|
if ((newlength = self->ob_size + n) <= 0 ||
|
||||||
(newbytes = newlength * itemsize) / itemsize != newlength)
|
(newbytes = newlength * itemsize) / itemsize !=
|
||||||
|
(size_t)newlength)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
PyMem_RESIZE(item, char, newbytes);
|
PyMem_RESIZE(item, char, newbytes);
|
||||||
if (item == NULL) {
|
if (item == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue