summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-03-19 22:42:51 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-03-19 22:42:51 (GMT)
commit453e08c3bfa334bd8e12f521e4f768abdd9997a4 (patch)
tree76e8f817485290f6cfcd4d0740c7848b242ec579 /Modules
parentd5e2b6f3bcef9fea744bef331ad7278052223f11 (diff)
downloadcpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.zip
cpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.tar.gz
cpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.tar.bz2
Create a signed CRC32 hash. I'm not absolutely sure it's correct. At least it fixes the unit tests and doesn't create a different hash than Python 2.x
Diffstat (limited to 'Modules')
-rw-r--r--Modules/zlibmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index a978370..551fd3e 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -940,7 +940,7 @@ PyZlib_crc32(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "s#|k:crc32", &buf, &len, &crc32val))
return NULL;
crc32val = crc32(crc32val, buf, len);
- return PyLong_FromUnsignedLong(crc32val & 0xffffffff);
+ return PyLong_FromLong(crc32val & 0xffffffff);
}