Skip to content

Implement getenv for non-Windows OSes#15

Open
mgord9518 wants to merge 1 commit intomarler8997:mainfrom
mgord9518:patch-1
Open

Implement getenv for non-Windows OSes#15
mgord9518 wants to merge 1 commit intomarler8997:mainfrom
mgord9518:patch-1

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