Fix UnsafeBlitFormatter for the case of endianess mismatch by pCYSl5EDgo · Pull Request #1894 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content

Fix UnsafeBlitFormatter for the case of endianess mismatch#1894

Merged
AArnott merged 2 commits into
MessagePack-CSharp:developfrom
pCYSl5EDgo:UnsafeBlitFormatter
Jul 21, 2024
Merged

Fix UnsafeBlitFormatter for the case of endianess mismatch#1894
AArnott merged 2 commits into
MessagePack-CSharp:developfrom
pCYSl5EDgo:UnsafeBlitFormatter

Conversation

@pCYSl5EDgo

@pCYSl5EDgo pCYSl5EDgo commented Jul 20, 2024

Copy link
Copy Markdown
Contributor

The signature of UnsafeBlitFormatterBase needs to be changed.
It requires the endianess-reverser.

The constraints of type parameter T is now changed from struct to unmanaged.
Unity 2022 can use C#9 and unmanaged constraint was introduced since C#7.3.
This change reduces the call of Marshal.Cast.

Related issue #1868

@AArnott AArnott added this to the v3.0 milestone Jul 21, 2024
@AArnott AArnott merged commit aaf99a7 into MessagePack-CSharp:develop Jul 21, 2024
@pCYSl5EDgo pCYSl5EDgo deleted the UnsafeBlitFormatter branch July 21, 2024 15:02
This was referenced Jun 15, 2026
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