Skip to content

GenAPI does not handle fixed buffers #31744

@DaZombieKiller

Description

@DaZombieKiller
  • This issue is blocking
  • This issue is causing unreasonable pain

When using GenAPI on an assembly that contains fixed buffers, it will output the generated fixed buffer structures with unspeakable names, rather than fixed fields.

Given the following type:

public struct MyFixedBuffer
{
    public unsafe fixed int Buffer[64];
}

GenAPI will produce this output:

[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct MyFixedBuffer
{
    public MyFixedBuffer.<Buffer>e__FixedBuffer Buffer;
    [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
    [System.Runtime.CompilerServices.UnsafeValueTypeAttribute]
    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=256)]
    public partial struct <Buffer>e__FixedBuffer
    {
        public int FixedElementField;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-GenAPIhelp wantedIssues that we would accept external contributions on. Also known as up-for-grabs.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions