Skip to content

Expose additional indexers for generated _e__FixedBuffer types #450

Description

@DaZombieKiller

ClangSharpPInvokeGenerator will currently only expose an int indexer for its generated _e__FixedBuffer types. This creates an inconsistency with normal fixed buffers, necessitating casts if the field is not able to be emitted as a fixed buffer.

I propose also generating the following indexers:

ref T this[uint index] { get; }
ref T this[nint index] { get; }
ref T this[nuint index] { get; }

This will bring _e__FixedBuffer structures in line with both fixed buffers and the overloads of Unsafe.Add.

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