Skip to content

Conversation

@suirad
Copy link
Contributor

@suirad suirad commented Nov 22, 2018

  • Change FreeEnvironmentStringsA to FreeEnvironmentStringsW
  • Change GetEnvironmentVariableA to GetEnvironmentVariableW
  • Change GetEnvironmentStringsA to GetEnvironmentStringsW
  • Updated os.getEnvMap to use the stack for environment keys and values with a length under 50 to be built on the stack; anything larger is allocated on the heap.

Addresses #534

@suirad suirad changed the title Update windows imports Update windows imports to use 'W' functions Nov 22, 2018
@suirad
Copy link
Contributor Author

suirad commented Nov 22, 2018

Are new tests desired for these pulls? I made some locally, but wasn't sure if they were wanted.

@Hejsil Hejsil assigned Hejsil and unassigned Hejsil Nov 22, 2018
Copy link
Contributor

@daurnimator daurnimator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 0 context here, but are you aware that windows doesn't use well-formed UTF16? This ill-formed utf16 is not safely convertible to utf8. When converting you have to use "WTF-8" instead.

@andrewrk
Copy link
Member

@daurnimator thanks - I filed #1774 in response to your comment.

Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - an optional improvement and a minor documentation addition and then it's ready for merge.

@andrewrk
Copy link
Member

Are new tests desired for these pulls? I made some locally, but wasn't sure if they were wanted.

Tests would be much appreciated

@suirad
Copy link
Contributor Author

suirad commented Nov 24, 2018

Code has been updated for review.

  • Updated os.getEnvMap to use the stack for environment keys and values with a length under 50 to be built on the stack; anything larger is allocated on the heap.

@suirad
Copy link
Contributor Author

suirad commented Nov 25, 2018

Im not sure why the pipeline is stopping where it does

@suirad
Copy link
Contributor Author

suirad commented Nov 30, 2018

@andrewrk which env variables should i have the tests look for?

@andrewrk andrewrk merged commit cf266ff into ziglang:master Dec 13, 2018
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.

4 participants