Skip to content

Get rid of drop flags in wrappers #12

Closed
@Boddlnagg

Description

@Boddlnagg

Both HString and ComPtr<T> should be pointer sized, since they are wrapping a pointer, but actually are bigger because of drop flags. This is a problem for arrays/slices, because an array of HSTRINGs should be transmutable to an array of HStrings, and the same for ComPtr (element-wise conversion would be too expensive). This is why we currently expose raw types for arrays.

One possibility is #[unsafe_no_drop_flag], but this would not work on stable. Waiting for rust-lang/rust#34398 should also resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions