hashlib: Fix old message about unicode objects. (GH-28653)

This commit is contained in:
Julien Palard 2021-10-01 14:38:49 +02:00 committed by GitHub
parent 1dac95c814
commit 9ce0f48e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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