Nick Coghlan ncogh...@gmail.com added the comment:
Closing as a dupe of 10181, but transferring Lenard's comments over there.
--
resolution: - duplicate
status: open - closed
superseder: - Problems with Py_buffer management in memoryobject.c (and
elsewhere?)
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +mark.dickinson, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10001
___
___
Lenard Lindstrom le...@telus.net added the comment:
This will work for bf_getbuffer, though having PyObject_GetBuffer set
the obj field before passing it to the callback might be safer. Also,
this does not address the case with wrapper types like memoryview. What
happens if ~Py_buffer.obj is
New submission from Lenard Lindstrom le...@telus.net:
Python 3.2a2+ (py3k:85072M, Sep 29 2010, 12:11:17) (from SVN)
[GCC 4.4.5 20100728 (prerelease)] on linux2 (Debian squeeze)
The ~Py_buffer.obj field is undocumented. Yet memoryview, that acts as a
wrapper, includes the field in gc traversal.
Antoine Pitrou pit...@free.fr added the comment:
The recommended way is to use PyBuffer_FillInfo() (and then fill in any
additional data if necessary), which will set the pointer and incref it itself.
I agree all this is a bit poorly documented.
--
assignee: - d...@python
components: