diff options
| author | William Roe <git@wjlr.org.uk> | 2022-05-23 13:09:37 +0100 |
|---|---|---|
| committer | William Roe <git@wjlr.org.uk> | 2022-05-23 13:48:55 +0100 |
| commit | 54a326f04601e93475c74b5a862d0269c70933b6 (patch) | |
| tree | c53db4de040cab0c8d4dd669e9c37855f48e0887 /src/check_decl.cpp | |
| parent | a31d23a32a04554af964850efa8d44c5467c176c (diff) | |
[os] Darwin,FreeBSD,OpenBSD: Rename os.getenv to os.get_env
Make os.get_env consistent across Unixes
This matches the function name and API from env_windows.odin and os_linux.odin, which should be the same everywhere. Meaning:
* named get_env and not getenv
* return a string (empty if the environment variable is not found)
* accept a default value parameter for the allocator (defaulting to context.allocator)
* calls lookup_env which returns an extra found boolean value
This is so that you don't have to write platform/OS conditionals when getting environment variable values from the stdlib os.get_env/getenv function.
Diffstat (limited to 'src/check_decl.cpp')
0 files changed, 0 insertions, 0 deletions