Skip to content

Conversation

@DaZombieKiller
Copy link
Contributor

@DaZombieKiller DaZombieKiller commented Oct 28, 2022

Allows a user to specify an exact value for StructLayoutAttribute.Pack, which is useful for controlling packing with a constant value defined in C#.

For example, --with-packing ExampleStruct=InteropDetails.PackConstant given the following header:

struct ExampleStruct
{
};

Will output the following C# definition of ExampleStruct:

[StructLayout(LayoutKind.Sequential, Pack = InteropDetails.PackConstant)]
public partial struct ExampleStruct
{
}

@DaZombieKiller DaZombieKiller changed the title Add support for --with-pack-override Add support for --with-packing Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants