diff options
author | Guido van Rossum <guido@python.org> | 2007-08-26 19:14:15 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-26 19:14:15 (GMT) |
commit | a43cae3a0776f5dcbd2a54a0984cdff97e757cae (patch) | |
tree | 10f9fa28b155a4f2ada342dcf06b96a6b0fd98f1 /Modules/_hashopenssl.c | |
parent | a62db275469dedb898eb24aa547a183d23c0106d (diff) | |
download | cpython-a43cae3a0776f5dcbd2a54a0984cdff97e757cae.zip cpython-a43cae3a0776f5dcbd2a54a0984cdff97e757cae.tar.gz cpython-a43cae3a0776f5dcbd2a54a0984cdff97e757cae.tar.bz2 |
Pass PyBUF_CHARACTER instead of PyBUF_SIMPLE to PyObject_GetBuffer().
This makes the failing tests (test_unicodedata and, on OSX, test_hashlib) pass.
XXX However, I'm not sure that this is the right thing to do;
this behavior means that Unicode strings are automatically hashed as their
UTF-8 encoding. Is that what we want?
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index eab190b..9ee1b3d 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -158,7 +158,7 @@ EVP_hexdigest(EVPobject *self, PyObject *unused) "object supporting the buffer API required"); \ return NULL; \ } \ - if (PyObject_GetBuffer((obj), (viewp), PyBUF_SIMPLE) == -1) { \ + if (PyObject_GetBuffer((obj), (viewp), PyBUF_CHARACTER) == -1) { \ return NULL; \ } \ if ((viewp)->ndim > 1) { \ |