summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-03-25 07:31:28 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-03-25 07:31:28 (GMT)
commit1fa588e14f8c091f5da6c23820b1ea6cc0d8ddff (patch)
treeb4d07a1c064b3f9de4329ee5aa69ccd927a7b633 /Modules/zlibmodule.c
parent18f1914a02daec18657d0eeb1d5060fc05638a3c (diff)
downloadcpython-1fa588e14f8c091f5da6c23820b1ea6cc0d8ddff.zip
cpython-1fa588e14f8c091f5da6c23820b1ea6cc0d8ddff.tar.gz
cpython-1fa588e14f8c091f5da6c23820b1ea6cc0d8ddff.tar.bz2
Use a 32-bit unsigned int here, a long is not needed.
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r--Modules/zlibmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 7637deb..f59343f 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -889,11 +889,11 @@ PyDoc_STRVAR(adler32__doc__,
static PyObject *
PyZlib_adler32(PyObject *self, PyObject *args)
{
- uLong adler32val = 1; /* adler32(0L, Z_NULL, 0) */
+ unsigned int adler32val = 1; /* adler32(0L, Z_NULL, 0) */
Byte *buf;
int len, signed_val;
- if (!PyArg_ParseTuple(args, "s#|k:adler32", &buf, &len, &adler32val))
+ if (!PyArg_ParseTuple(args, "s#|I:adler32", &buf, &len, &adler32val))
return NULL;
/* In Python 2.x we return a signed integer regardless of native platform
* long size (the 32bit unsigned long is treated as 32-bit signed and sign
@@ -912,11 +912,11 @@ PyDoc_STRVAR(crc32__doc__,
static PyObject *
PyZlib_crc32(PyObject *self, PyObject *args)
{
- uLong crc32val = 0; /* crc32(0L, Z_NULL, 0) */
+ unsigned int crc32val = 0; /* crc32(0L, Z_NULL, 0) */
Byte *buf;
int len, signed_val;
- if (!PyArg_ParseTuple(args, "s#|k:crc32", &buf, &len, &crc32val))
+ if (!PyArg_ParseTuple(args, "s#|I:crc32", &buf, &len, &crc32val))
return NULL;
/* In Python 2.x we return a signed integer regardless of native platform
* long size (the 32bit unsigned long is treated as 32-bit signed and sign