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?
1 file changed