From a glance I think the uv_os_* methods are adequate to replace our conditional switches in the RealEnvStore methods.
I think this is a good first issue if you are familiar with C++ and has some idea on how to use libuv methods, but you may need to read into the libuv implementation to make sure the refactor does not change the functionality.
Pointers:
|
const char* val = getenv(*key); |
|
if (getenv(*key)) return 0; |
docs:
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_getenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_setenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_unsetenv
From a glance I think the uv_os_* methods are adequate to replace our conditional switches in the RealEnvStore methods.
I think this is a good first issue if you are familiar with C++ and has some idea on how to use libuv methods, but you may need to read into the libuv implementation to make sure the refactor does not change the functionality.
Pointers:
node/src/node_env_var.cc
Line 71 in dfd7e99
node/src/node_env_var.cc
Line 107 in dfd7e99
node/src/node_env_var.cc
Line 123 in dfd7e99
node/src/node_env_var.cc
Line 146 in dfd7e99
docs:
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_getenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_setenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_unsetenv