Skip to content

Commit

Permalink
GObject.Type: Mark struct as readonly and make it a record
Browse files Browse the repository at this point in the history
This improves performance as a generated equality function is used instead of a runtime check and allows for further compiler optimizations.
  • Loading branch information
badcel committed Sep 3, 2024
1 parent 4311034 commit 7426ac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Libs/GLib-2.0/GObject/Public/Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace GObject;

[StructLayout(LayoutKind.Explicit)]
public struct Type
public readonly record struct Type
{

//This is a manual implementation of GObject.Type inside GLib project inside the GObject namespace.
Expand Down

0 comments on commit 7426ac9

Please sign in to comment.