Skip to content

ctypes .from_buffer only works for array.array #1404

@orent

Description

@orent

The .from_buffer[_copy] methods of ctypes types only accept an array.array argument. Other implementations such as cpython, pypy also accept bytes, bytearray, mmap, memoryview etc.

The struct and re module accept a wider variety of buffer-like objects. Strangely, re accepts mmap objects, but stuct does not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions