-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Provide ctypes.memoryview_at() #112015
Copy link
Copy link
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-ctypestype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-ctypestype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done
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 use
ctypes.string_at()to createbytesobjects. The advantage of usingmemoryviewobjects is that we can elide a buffer copy.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
ctypes.memoryview_at()#112018