This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients larry, methane, serhiy.storchaka, vstinner
Date 2017-02-02.10:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
-    if (PyObject_GetBuffer(input, &vbuf, PyBUF_SIMPLE) < 0)
-        return NULL;

Oh by the way, I forgot to mention a subtle change. PyObject_GetBuffer(PyBUF_SIMPLE) is less strict that PyArg_Parse("y#") / "buffer" converter of Argument Clinic: getargs.c also checks that the buffer is contiguous, extract of getbuffer():

    if (!PyBuffer_IsContiguous(view, 'C')) {
        *errmsg = "contiguous buffer";
        return -1;

I don't know well the buffer protocol. I don't know any object which provide a non-contiguous buffer. At least, I can say that the last time I looked at this dark part of Python, the documentation was between tiny and non-existent :-/ The buffer protocol is complex but not well documented :-(
Date User Action Args
2017-02-02 10:57:05vstinnersetrecipients: + vstinner, larry, methane, serhiy.storchaka
2017-02-02 10:57:05vstinnersetmessageid: <>
2017-02-02 10:57:05vstinnerlinkissue29300 messages
2017-02-02 10:57:05vstinnercreate