Skip to content
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

Add macros for creating null-terminated string literals to windows-sys #2043

Merged
merged 3 commits into from Sep 20, 2022

Conversation

kennykerr
Copy link
Collaborator

Much like #1891 for the windows crate, this adds simple s! and w! macros that produce null terminated UTF-8 and UTF-16 string literals. These are slightly simpler since the w! macro in this case does not attempt to also support WinRT APIs and merely produces a UTF-16 pointer. As with their windows crate counterparts, the resulting expressions point to const data that is both folded by the compiler and stored in constant pages.

@kennykerr kennykerr merged commit dd244b5 into master Sep 20, 2022
@kennykerr kennykerr deleted the sys-literals branch September 20, 2022 21:24
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.

None yet

1 participant