mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
#3560: cleanup C memoryview API
This commit is contained in:
parent
fd036451bf
commit
ee58fa484e
5 changed files with 30 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue