#3560: cleanup C memoryview API

This commit is contained in:
Antoine Pitrou 2008-08-19 18:22:14 +00:00
parent fd036451bf
commit ee58fa484e
5 changed files with 30 additions and 18 deletions

View file

@ -1200,7 +1200,7 @@ PyObject *PyUnicode_Decode(const char *s,
buffer = NULL;
if (PyBuffer_FillInfo(&info, NULL, (void *)s, size, 1, PyBUF_SIMPLE) < 0)
goto onError;
buffer = PyMemoryView_FromMemory(&info);
buffer = PyMemoryView_FromBuffer(&info);
if (buffer == NULL)
goto onError;
unicode = PyCodec_Decode(buffer, encoding, errors);