summaryrefslogtreecommitdiff
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-03-19 21:50:11 +0000
committerGuido van Rossum <guido@python.org>1999-03-19 21:50:11 +0000
commit61c2837f973fd865edd124e49b86ab9e6190daf2 (patch)
tree5543ecc241988be9e49163406c176e00b18172f4 /Modules/arraymodule.c
parent19aeaf3c637042ead94e065b9b2dac4883234b36 (diff)
downloadcpython-61c2837f973fd865edd124e49b86ab9e6190daf2.tar.gz
Use an unsigned cast to avoid a warning in VC++.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index bb0a9edb33..8bd9a55f74 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -939,7 +939,8 @@ array_fromfile(self, args)
size_t newbytes;
/* Be careful here about overflow */
if ((newlength = self->ob_size + n) <= 0 ||
- (newbytes = newlength * itemsize) / itemsize != newlength)
+ (newbytes = newlength * itemsize) / itemsize !=
+ (size_t)newlength)
goto nomem;
PyMem_RESIZE(item, char, newbytes);
if (item == NULL) {