From 199c30e802ec05406435e49cdb00ab4416901aaf Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Fri, 5 Dec 2008 01:42:09 +0000 Subject: Merged revisions 67541 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ 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 ........ --- Misc/NEWS | 3 +++ Modules/binascii.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index e2a7239..be55e58 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -15,6 +15,9 @@ Core and Builtins 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. diff --git a/Modules/binascii.c b/Modules/binascii.c index 52bd6dc..51101b4 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -1019,7 +1019,7 @@ binascii_crc32(PyObject *self, PyObject *args) 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; -- cgit v0.12