[3.9] hashlib: Fix old message about unicode objects. (GH-28653) (GH-28679)

(cherry picked from commit 9ce0f48e91)


Co-authored-by: Julien Palard <julien@palard.fr>
This commit is contained in:
Miss Islington (bot) 2021-10-01 06:28:19 -07:00 committed by GitHub
parent 4d5d161d2a
commit 8822526caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@
#define GET_BUFFER_VIEW_OR_ERROR(obj, viewp, erraction) do { \
if (PyUnicode_Check((obj))) { \
PyErr_SetString(PyExc_TypeError, \
"Unicode-objects must be encoded before hashing");\
"Strings must be encoded before hashing");\
erraction; \
} \
if (!PyObject_CheckBuffer((obj))) { \