homepage

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 <1486033025.36.0.712039106771.issue29300@psf.upfronthosting.co.za>
In-reply-to
Content
- 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')) {
 PyBuffer_Release(view);
 *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 :-(
History
Date User Action Args
2017年02月02日 10:57:05vstinnersetrecipients: + vstinner, larry, methane, serhiy.storchaka
2017年02月02日 10:57:05vstinnersetmessageid: <1486033025.36.0.712039106771.issue29300@psf.upfronthosting.co.za>
2017年02月02日 10:57:05vstinnerlinkissue29300 messages
2017年02月02日 10:57:05vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /