Skip to content

Commit

Permalink
Senerate partial structs to allow struct decoration (#214)
Browse files Browse the repository at this point in the history
Co-authored-by: Ruslan Balanukhin <[email protected]>
  • Loading branch information
Ruslan-B and Ruslan Balanukhin committed Aug 8, 2022
1 parent ca5f40e commit d7f6e23
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 120 deletions.
2 changes: 1 addition & 1 deletion FFmpeg.AutoGen.CppSharpUnsafeGenerator/Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void WriteStructure(StructureDefinition structure)
if (!structure.IsComplete) WriteLine("/// <remarks>This struct is incomplete.</remarks>");
WriteObsoletion(structure);
if (structure.IsUnion) WriteLine("[StructLayout(LayoutKind.Explicit)]");
WriteLine($"public unsafe struct {structure.Name}");
WriteLine($"public unsafe partial struct {structure.Name}");

using (BeginBlock())
foreach (var field in structure.Fields)
Expand Down
Loading

0 comments on commit d7f6e23

Please sign in to comment.