Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
Closed
Description
Feature or enhancement
Proposal:
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 usectypes.string_at() to createbytes objects. The advantage of usingmemoryview objects is that we can elide a buffer copy.
importctypesa= (ctypes.c_ubyte*10)()ctypes.buffer_at(a,10,True)[0]=1asserta[0]==1a[0]=2assertctypes.buffer_at(a,10,True)[0]==2
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done