Skip to content

ctypes::void still isn't correct #1907

Closed
@brson

Description

@brson

This type is intended to only be used as an opaque type for unsafe pointers to point to. It is defined in a way that isn't constructable or destructurable, but it is still a copyable type. That means that you can define type complicated_c_struct = ctypes::void with the intent of using it only as an unsafe pointer, but could potentially write let newcopy = *complicated_c_struct_pointer and create a big mess.

We could put a resource field inside it to prevent this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions