You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to easily make memoryview objects from pointer-able ctypes objects with an arbitrary length. In the same way we can currently use ctypes.string_at() to create bytes objects. The advantage of using memoryview objects is that we can elide a buffer copy.
Activity
rianhunter commentedon Sep 19, 2024
Abandoned
ncoghlan commentedon Sep 26, 2024
@encukou is taking up work on the associated PR. Thanks for taking it this far @rianhunter!
[-]Provide `ctypes.buffer_at()`[/-][+]Provide `ctypes.memoryview_at()`[/+]gh-112015: Implement `ctypes.memoryview_at()` (GH-112018)
encukou commentedon Jan 3, 2025
And it's in!
Thank you @rianhunter for the proposal and implementation, and all the reviewers for their insights.
pythongh-112015: Implement `ctypes.memoryview_at()` (pythonGH-112018)
pythongh-112015: Implement `ctypes.memoryview_at()` (pythonGH-112018)