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

Implement getenv for non-Windows OSes #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgord9518
Copy link

As Windows does not have a populated environ of U8s, it'll take a slightly different solution. I did some looking at the Zig stdlib os.getenv, and it uses the 0 byte to find the end of the environment variable, along with environ being a slice of [:0]const u8, so I have no clue why it isn't returned as [:0]const u8. Might be an issue in os.getenv

As Windows does not have a populated environ of U8s, it'll take a slightly different solution. I did some looking at the Zig stdlib os.getenv, and it uses the 0 byte to find the end of the environment variable, along with environ being a slice of [:0]const u8, so I have no clue why it isn't returned as [:0]const u8. Might be an issue in os.getenv
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.

1 participant