summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/binascii.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 15e3401..87af173 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,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;