Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xtqqczze
Copy link
Contributor

Remove explicit CharSet values from [StructLayout] attributes applied to structs that do not contain char, string or StringBuilder fields.

The CharSet field in [StructLayout] influences marshalling behavior only when a struct includes char, string or StringBuilder members. For structs that contain only value types or blittable types, specifying CharSet is redundant and has no effect on layout or marshaling.

Subset of #26005.

Remove explicit `CharSet` values from `[StructLayout]` attributes applied to structs that do not contain `char`, `string`, or `StringBuilder` fields.
@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Oct 17, 2025
@iSazonov iSazonov self-assigned this Oct 17, 2025
@iSazonov iSazonov changed the title Remove redundant CharSet from StructLayout attributes Remove redundant CharSet from StructLayout attributes. Part 1 Oct 17, 2025
@iSazonov iSazonov enabled auto-merge (squash) October 17, 2025 04:01
@iSazonov iSazonov merged commit fcb0e5c into PowerShell:master Oct 20, 2025
33 of 34 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Oct 20, 2025

📣 Hey @@xtqqczze, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@xtqqczze xtqqczze deleted the rm-structlayout-charset-p1 branch October 20, 2025 10:52
SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request Dec 12, 2025
kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants