[docs] [issue15821] Improve docs for PyMemoryView_FromBuffer()
Alexander Belopolsky
report at bugs.python.org
Thu Aug 30 19:30:02 CEST 2012
Alexander Belopolsky added the comment:
I've updated test_indirect.py to print all memoryview fields and cleaned up the _testbuffer patch a little. Note this code that is needed to prevent a memory leak:
+ /* PyMemoryView_FromBuffer ignores info.obj. Add it explicitely. */
+ if (view != NULL)
+ ((PyMemoryViewObject *)view)->view.obj = info.obj;
Shouldn't PyMemoryView_FromBuffer() copy non-NULL obj from Py_buffer?
----------
Added file: http://bugs.python.org/file27062/test_indirect.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15821>
_______________________________________
More information about the docs
mailing list