Sam Atkins

Results 309 comments of Sam Atkins

**Changes:** - Rebase! - Fix MacOS (hopefully???): Fall back to regular getenv(), and copy the implementation of clearenv() from LibC. - Replace the goofy `for_each_entry()` with an iterator. I know...

**Changes:** - Iterate `entries()` instead of calling `getenv()` - Replace `get_secure()` with a second parameter to `Environment::get()`, which defaults to non-secure. - Remove unnecessary const qualifiers in the Entry iterator....

**Changes:** - Go back to calling `getenv()`/`secure_getenv()` directly, because otherwise we have to include `` which doesn't always exist, including on CI! - Rename `Environment::Secure` to `Environment::SecureOnly`.

> Missing a header for `environ` on macOS > > `/Users/runner/work/1/s/Userland/Libraries/LibCore/Environment.cpp:61:24: error: use of undeclared identifier 'environ'` > > [dev.azure.com/SerenityOS/SerenityOS/_build/results?buildId=44741&view=logs&j=2351e412-c793-598f-27f8-72c4f2d55ba1&t=9c50333a-ada2-5596-d44b-d8dcee270ad2&l=99](https://dev.azure.com/SerenityOS/SerenityOS/_build/results?buildId=44741&view=logs&j=2351e412-c793-598f-27f8-72c4f2d55ba1&t=9c50333a-ada2-5596-d44b-d8dcee270ad2&l=99) **Changes:** - Use the `environ` wrapper so things work on...

**Changes:** - Another macOS fix, marking a parameter as `[[maybe_unused]]` which isn't used in the macOS code. Deary me, macOS will be the end of me. :laughing:

**Changes:** - Fixed the conflict. :smiling_face_with_tear:

> From my point of view it would be better to open a separate PR for the changes in commit: [LibCore: Refactor template definitions to header in ArgsParser](https://github.com/SerenityOS/serenity/pull/22830/commits/bdf8acdf1edbddeebee6a04527a2318d62c0cb27) so those...

It shouldn't be necessary to know if the calc holds an integer or not. The spec says to round the calc result to an integer if an integer is expected....

Ah I shouldn't phone-review. :sweat_smile: Rather than try to parse a calc value, then try to parse an integer, this can use `Parser::parse_integer(tokens)`, something like: ```c++ if (auto maybe_value =...

:thonk: We really shouldn't be resolving calc values there, just simplifying them as much as possible.