diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-04-12 19:17:24 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-04-14 22:47:29 +0200 |
commit | 9d522225e7907b6cf631975b34f586984f698e33 (patch) | |
tree | 544e58031bc52a4b2658c02ba1a247f443378928 /src/uv.cc | |
parent | f98db78f7756b29bd0e92c469a7fb7425f1267af (diff) | |
download | node-new-9d522225e7907b6cf631975b34f586984f698e33.tar.gz |
src: reduce number of exported symbols
Use `static` definitions and anonymous namespaces to reduce the
number of symbols that are exported from the `node` binary.
PR-URL: https://github.com/nodejs/node/pull/12366
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/uv.cc')
-rw-r--r-- | src/uv.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -25,7 +25,7 @@ #include "env-inl.h" namespace node { -namespace uv { +namespace { using v8::Context; using v8::FunctionCallbackInfo; @@ -45,9 +45,9 @@ void ErrName(const FunctionCallbackInfo<Value>& args) { } -void Initialize(Local<Object> target, - Local<Value> unused, - Local<Context> context) { +void InitializeUV(Local<Object> target, + Local<Value> unused, + Local<Context> context) { Environment* env = Environment::GetCurrent(context); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "errname"), env->NewFunctionTemplate(ErrName)->GetFunction()); @@ -59,7 +59,7 @@ void Initialize(Local<Object> target, } -} // namespace uv +} // anonymous namespace } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(uv, node::uv::Initialize) +NODE_MODULE_CONTEXT_AWARE_BUILTIN(uv, node::InitializeUV) |