Skip to content

Commit

Permalink
Add partial to all generated structs
Browse files Browse the repository at this point in the history
  • Loading branch information
lithiumtoast committed Jan 3, 2025
1 parent 5c62458 commit b2a81db
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// <auto-generated>
// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v2025-01-03 14:27:37 GMT-05:00)
// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v2025-01-03 14:36:43 GMT-05:00)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v0.0.0.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <auto-generated>
// This code was generated by the following tool on 2025-01-03 14:27:37 GMT-05:00:
// This code was generated by the following tool on 2025-01-03 14:36:43 GMT-05:00:
// https://github.com/bottlenoselabs/c2cs (v0.0.0.0)
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down Expand Up @@ -63,7 +63,7 @@ public enum hw_my_enum_week_day : int
}

[StructLayout(LayoutKind.Sequential)]
public struct FnPtr_CString_Void
public partial struct FnPtr_CString_Void
{
public delegate* unmanaged<CString, void> Pointer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override string GenerateCode(

var code = $$"""
[StructLayout(LayoutKind.Explicit, Size = {{sizeOf}}, Pack = {{alignOf}})]
public struct {{nameCSharp}}
public partial struct {{nameCSharp}}
{
[FieldOffset(0)]
public {{underlyingTypeNameCSharp}} Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private string GenerateCodeFunctionPointer(

var code = $$"""
[StructLayout(LayoutKind.Sequential)]
public struct {{name}}
public partial struct {{name}}
{
public delegate* unmanaged<{{parameterTypesAndReturnTypeString}}> Pointer;
Expand All @@ -51,7 +51,7 @@ private string GenerateCodeDelegate(

var code = $$"""
[StructLayout(LayoutKind.Sequential)]
public struct {{name}}
public partial struct {{name}}
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate {{node.ReturnType.Name}} @delegate({{parameterTypesString}});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override string GenerateCode(
{
var code = $$"""
[StructLayout(LayoutKind.Sequential)]
public struct {{nameCSharp}}
public partial struct {{nameCSharp}}
{
}
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override string GenerateCode(string nameCSharp, CodeGeneratorContext c

var code = $$"""
[StructLayout(LayoutKind.Explicit, Size = {{record.SizeOf}}, Pack = {{record.AlignOf}})]
public struct {{nameCSharp}}
public partial struct {{nameCSharp}}
{
{{membersCode}}
}
Expand Down

0 comments on commit b2a81db

Please sign in to comment.