Message169460
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. |
|
Date |
User |
Action |
Args |
2012-08-30 14:36:13 | belopolsky | set | recipients:
+ belopolsky, ncoghlan, pitrou, skrah, docs@python |
2012-08-30 14:36:13 | belopolsky | set | messageid: <1346337373.39.0.378356509277.issue15821@psf.upfronthosting.co.za> |
2012-08-30 14:36:12 | belopolsky | link | issue15821 messages |
2012-08-30 14:36:12 | belopolsky | create | |
|