summaryrefslogtreecommitdiff
path: root/Modules/binascii.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-03-18 22:27:41 +0000
committerGregory P. Smith <greg@mad-scientist.com>2008-03-18 22:27:41 +0000
commitc856fa811dfdd6d17396d9aa522eea19b0f46c93 (patch)
treedf1e5900e00c10f3cc4782ffc1aa963ee73e2efa /Modules/binascii.c
parent6a644f92efb35e75f81d183aebfff3260b1454e2 (diff)
downloadcpython-git-c856fa811dfdd6d17396d9aa522eea19b0f46c93.tar.gz
Add a test to make sure zlib.crc32 and binascii.crc32 return the same thing.
Fix a buglet in binascii.crc32, the second optional argument could previously have a signedness mismatch with the C variable its going into.
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r--Modules/binascii.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c
index 00f950d19d..659e08ce5c 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -874,7 +874,7 @@ binascii_crc32(PyObject *self, PyObject *args)
Py_ssize_t len;
long result;
- if ( !PyArg_ParseTuple(args, "s#|l:crc32", &bin_data, &len, &crc) )
+ if ( !PyArg_ParseTuple(args, "s#|k:crc32", &bin_data, &len, &crc) )
return NULL;
crc = ~ crc;