Skip to content

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Sep 7, 2025

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Sep 15, 2025
@xtqqczze xtqqczze marked this pull request as draft September 17, 2025 15:59
@microsoft-github-policy-service microsoft-github-policy-service bot added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Sep 20, 2025
@xtqqczze xtqqczze force-pushed the rm-structlayout-charset branch from 99b31a3 to f445d43 Compare September 21, 2025 00:25
@xtqqczze xtqqczze marked this pull request as ready for review September 21, 2025 00:27
@xtqqczze xtqqczze marked this pull request as draft September 23, 2025 09:32
@xtqqczze xtqqczze force-pushed the rm-structlayout-charset branch from f445d43 to 4cc76a8 Compare September 23, 2025 09:33
@xtqqczze xtqqczze marked this pull request as ready for review September 23, 2025 09:33
@xtqqczze xtqqczze changed the title Remove redundant CharSet from StructLayout attributes on non-string structs Remove redundant CharSet from StructLayout in structs without string-related fields Sep 28, 2025
@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Oct 16, 2025
Remove explicit `CharSet` values from `[StructLayout]` attributes applied to structs that do not contain `char`, `string`, or `StringBuilder` fields.
@xtqqczze xtqqczze force-pushed the rm-structlayout-charset branch from 4cc76a8 to 7a6b900 Compare October 20, 2025 10:55
@xtqqczze
Copy link
Contributor Author

Rebased after fcb0e5c

@iSazonov iSazonov enabled auto-merge (squash) October 20, 2025 11:26
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 Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants