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 belopolsky
Recipients belopolsky, docs@python, ncoghlan, pitrou, skrah
Date 2012-08-30.14:36:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346337373.39.0.378356509277.issue15821@psf.upfronthosting.co.za>
In-reply-to
Content
Having been bitten by an indirect buffer bug in 2.7, I decided to write some tests for 3.3.  I added an objview() function to _testbuffer module that creates an indirect view for nested tuples.  I have not written unit tests yet, so I'll attach a demo script test_indirect.py.

I hope this test case will be helpful in figuring out the right semantics for PyMemoryView_FromBuffer().  My feeling is that memoryview should be able to store shape/strides/suboffsets arrays in its own structure.  I also think the only way to achieve that is to make it a PyVarObject and allocate up to sizeof(Py_ssize_t)*ndim*3 bytes after the "view" substructure to store copies of shape/strides/suboffsets arrays.
History
Date User Action Args
2012-08-30 14:36:13belopolskysetrecipients: + belopolsky, ncoghlan, pitrou, skrah, docs@python
2012-08-30 14:36:13belopolskysetmessageid: <1346337373.39.0.378356509277.issue15821@psf.upfronthosting.co.za>
2012-08-30 14:36:12belopolskylinkissue15821 messages
2012-08-30 14:36:12belopolskycreate