mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
This commit is contained in:
parent
d5e2b6f3bc
commit
453e08c3bf
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue