Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-04-12 20:17:24 +0300
committerAnna Henningsen <anna@addaleax.net>2017-04-14 23:47:29 +0300
commit9d522225e7907b6cf631975b34f586984f698e33 (patch)
tree544e58031bc52a4b2658c02ba1a247f443378928 /src/node_constants.cc
parentf98db78f7756b29bd0e92c469a7fb7425f1267af (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.cc4
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);