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

Use single helper method to pass UTF-16 strings to Windows #12695

Merged

Conversation

HertzDevil
Copy link
Contributor

Moves all the check_no_null_byte.to_utf16.to_unsafe calls in the Win32 interfaces into a single method, and also renames it from to_windows_path to just to_wstr to indicate that it can be used with non-path values.

@HertzDevil HertzDevil added kind:refactor platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:system labels Oct 30, 2022
src/crystal/system/windows.cr Outdated Show resolved Hide resolved
@straight-shoota straight-shoota added this to the 1.7.0 milestone Oct 30, 2022
@straight-shoota straight-shoota merged commit 42a3f91 into crystal-lang:master Nov 1, 2022
@HertzDevil HertzDevil deleted the refactor/windows-to_wstr branch November 26, 2022 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:refactor platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants