[Python-3000-checkins] r67541 - in python/branches/py3k: Misc/NEWS Modules/binascii.c

amaury.forgeotdarc python-3000-checkins at python.org
Fri Dec 5 02:40:43 CET 2008


Author: amaury.forgeotdarc
Date: Fri Dec  5 02:40:43 2008
New Revision: 67541

Log:
#4542: On Windows, binascii.crc32 still accepted str as binary input.
This fixes test_binascii.

Will backport to 3.0


Modified:
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Modules/binascii.c

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Fri Dec  5 02:40:43 2008
@@ -16,6 +16,9 @@
 Library
 -------
 
+- Issue #4542: On Windows, binascii.crc32 still accepted str as binary input;
+  the corresponding tests now pass.
+
 - Issue #4537: webbrowser.UnixBrowser would fail to open the browser because
   it was calling the wrong open() function.
 

Modified: python/branches/py3k/Modules/binascii.c
==============================================================================
--- python/branches/py3k/Modules/binascii.c	(original)
+++ python/branches/py3k/Modules/binascii.c	Fri Dec  5 02:40:43 2008
@@ -1019,7 +1019,7 @@
 	Py_ssize_t len;
 	unsigned int result;
 
-	if ( !PyArg_ParseTuple(args, "s*|I:crc32", &pbin, &crc) )
+	if ( !PyArg_ParseTuple(args, "y*|I:crc32", &pbin, &crc) )
 		return NULL;
 	bin_data = pbin.buf;
 	len = pbin.len;


More information about the Python-3000-checkins mailing list