[Libreoffice-bugs] [Bug 124799] osl_getEnvironment wrapper ...

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Apr 18 10:21:42 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=124799

--- Comment #4 from Michael Meeks <michael.meeks at collabora.com> ---
Ah - sorry for not being clear; I'm suggesting a:

git grep osl_getEnvironment

and consider how many uses outside sal/ make a legitimate distinction between
NULL and empty environment variables. An:

OUString aWastedLineAndNoFunctionNesting;
if (new_getenv("FOO", aWastedLineAndNoFunctionNesting) ==
long_enumeration_value)
{
    Do nothing that useful;
}
function_using_env(aWastedLineAndNoFunctionNesting);

I would suggest is prettier as:

function_using_env(new_getenv("FOO"));

But of course - there is always the native C API if people want something more
complex.

Then again - using 'getenv()' is the progammers' choice anyway - with 320 hits
- an order of magnitude more - presumably because it is easier to use, read,
understand etc.. =)

Otherwise amazing point on the MSVC exporting of inlines - that's rather
interesting! quite possibly we should put the API somewhere higher up then
where it can be simpler and better adapted for our uses-cases (?)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190418/c9136c6d/attachment.html>


More information about the Libreoffice-bugs mailing list