diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-04-12 20:17:24 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-04-14 23:47:29 +0300 |
commit | 9d522225e7907b6cf631975b34f586984f698e33 (patch) | |
tree | 544e58031bc52a4b2658c02ba1a247f443378928 /src/node_constants.cc | |
parent | f98db78f7756b29bd0e92c469a7fb7425f1267af (diff) |
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/node_constants.cc')
-rw-r--r-- | src/node_constants.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc index 8bc95392f26..0e178602b73 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -53,6 +53,8 @@ using v8::Object; const char* default_cipher_list = DEFAULT_CIPHER_LIST_CORE; #endif +namespace { + void DefineErrnoConstants(Local<Object> target) { #ifdef E2BIG NODE_DEFINE_CONSTANT(target, E2BIG); @@ -1256,6 +1258,8 @@ void DefineZlibConstants(Local<Object> target) { NODE_DEFINE_CONSTANT(target, Z_DEFAULT_LEVEL); } +} // anonymous namespace + void DefineConstants(v8::Isolate* isolate, Local<Object> target) { Environment* env = Environment::GetCurrent(isolate); |