Skip to content

Conversation

xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Aug 22, 2025

No description provided.

`Guid` is not a blittable type, it requires special handling in the case of big-endian systems.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 22, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 22, 2025
@xtqqczze xtqqczze changed the title Fix memory storage of Guid Use Guid(ReadOnlySpan<Byte>) tor Aug 22, 2025
@xtqqczze xtqqczze changed the title Use Guid(ReadOnlySpan<Byte>) tor Use Guid(ReadOnlySpan<Byte>) ctor Aug 22, 2025
byte* ptr = GetCurrentPointerAndAdvance(size);
byte* ptr = GetCurrentPointerAndAdvance(sizeof(Guid));

#if NET
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that this change is worth it. It is adding ifdef, it is not reducing amount of unsafe code, and it may make the code a bit slower.

@jkotas jkotas closed this Aug 22, 2025
@xtqqczze xtqqczze deleted the fix-guidbytes branch August 22, 2025 19:17
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants