[Python-checkins] r67542 - in python/branches/release30-maint: Misc/NEWS Modules/binascii.c

amaury.forgeotdarc python-checkins at python.org
Fri Dec 5 02:42:09 CET 2008


Author: amaury.forgeotdarc
Date: Fri Dec  5 02:42:09 2008
New Revision: 67542

Log:
Merged revisions 67541 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r67541 | amaury.forgeotdarc | 2008-12-05 02:40:43 +0100 (ven., 05 déc. 2008) | 5 lines
  
  #4542: On Windows, binascii.crc32 still accepted str as binary input.
  This fixes test_binascii.
  
  Will backport to 3.0
........


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Misc/NEWS
   python/branches/release30-maint/Modules/binascii.c

Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS	(original)
+++ python/branches/release30-maint/Misc/NEWS	Fri Dec  5 02:42:09 2008
@@ -15,6 +15,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/release30-maint/Modules/binascii.c
==============================================================================
--- python/branches/release30-maint/Modules/binascii.c	(original)
+++ python/branches/release30-maint/Modules/binascii.c	Fri Dec  5 02:42:09 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-checkins mailing list