[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-29 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49cdb04bfcc6 by Stefan Krah in branch '3.4': Issue #21778: Clarify use of flags if PyBuffer_FillInfo() is used inside a http://hg.python.org/cpython/rev/49cdb04bfcc6 -- nosy: +python-dev ___ Python track

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-25 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: docs@python -> skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Stefan Krah
Stefan Krah added the comment: I think it's worth adding a note to the docs about passing the flags unmodified inside a getbufferproc. -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: not a bug -> stage: -> needs patch versions: +Python 3.4, Pytho

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Stefan Krah
Stefan Krah added the comment: Yes, PyBuffer_FillInfo() is a bit confusing: The canonical usage *looks* as if "flags" were somehow used in the Py_buffer struct to mark a buffer as having certain capabilities: Modules/_io/bufferedio.c: - if (PyBuffer_FillInfo(&buf, N

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Armin Rigo
Changes by Armin Rigo : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Armin Rigo
Armin Rigo added the comment: Ah! Thanks. I systematically missed the "flags" arguments passed in the getbufferproc function. (I thought I had to tell PyBuffer_FillInfo() what kind of format we actually provide, but it seems that the interface is the other way around. I don't see how I woul

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Stefan Krah
Stefan Krah added the comment: The flags from mb_getbuf() have to be passed to PyBuffer_FillInfo(): return PyBuffer_FillInfo(view, (PyObject *)self, internal, 5, /*readonly=*/0, flags); The flags contain the actual request that the con

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Armin Rigo
Changes by Armin Rigo : Added file: http://bugs.python.org/file35655/xymodule.c ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue21778] PyBuffer_FillInfo() from 3.3

2014-06-16 Thread Armin Rigo
New submission from Armin Rigo: Following the documentation at https://docs.python.org/3/c-api/buffer.html, if we write a custom object in C with a getbufferproc that simply returns PyBuffer_FillInfo(...), then it works fine up to Python 3.2 but segfaults in Python 3.3 depending on what we do