aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorWilliam Roe <git@wjlr.org.uk>2022-05-23 13:09:37 +0100
committerWilliam Roe <git@wjlr.org.uk>2022-05-23 13:48:55 +0100
commit54a326f04601e93475c74b5a862d0269c70933b6 (patch)
treec53db4de040cab0c8d4dd669e9c37855f48e0887 /src/common.cpp
parenta31d23a32a04554af964850efa8d44c5467c176c (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/common.cpp')
0 files changed, 0 insertions, 0 deletions