-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wpf: fix the TerminalTheme struct to marshal the same on all platforms #10486
Conversation
The CursorStyle enum is declared as being of type `uint` on the C# side, but as `size_t` on the C++ side. There's a C# size_t impostor we could use, System.UIntPtr, but I don't want to risk changing the public API of TerminalTheme and I don't know if it can be used as a base type for an enum value. Anyway, since we don't have more than four billion cursor types I chose to narrow the field to a uint32_t and unpack it in TerminalSetTheme. Fixes #10485
@msftbot merge this in 3 minutes |
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
#10486) The CursorStyle enum is declared as being of type `uint` on the C# side, but as `size_t` on the C++ side. There's a C# size_t impostor we could use, System.UIntPtr, but I don't want to risk changing the public API of TerminalTheme and I don't know if it can be used as a base type for an enum. Anyway, since we don't have more than four billion cursor types I chose to narrow the field to a uint32_t and unpack it in TerminalSetTheme. Fixes #10485 (cherry picked from commit 2770228)
#10486) The CursorStyle enum is declared as being of type `uint` on the C# side, but as `size_t` on the C++ side. There's a C# size_t impostor we could use, System.UIntPtr, but I don't want to risk changing the public API of TerminalTheme and I don't know if it can be used as a base type for an enum. Anyway, since we don't have more than four billion cursor types I chose to narrow the field to a uint32_t and unpack it in TerminalSetTheme. Fixes #10485 (cherry picked from commit 2770228)
🎉 Handy links: |
🎉 Handy links: |
The CursorStyle enum is declared as being of type
uint
on the C# side,but as
size_t
on the C++ side. There's a C# size_t impostor we coulduse, System.UIntPtr, but I don't want to risk changing the public API of
TerminalTheme and I don't know if it can be used as a base type for an
enum.
Anyway, since we don't have more than four billion cursor types I chose
to narrow the field to a uint32_t and unpack it in TerminalSetTheme.
Fixes #10485