From b4a86c29ea74e66cbe0183177a41594de43e895b Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 13 Oct 2017 12:59:04 -0400 Subject: [PATCH 1/2] n-api: use module name macro Update tests to use module name macro --- test/addons-napi/test_warning/test_warning.c | 2 +- test/addons-napi/test_warning/test_warning2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/addons-napi/test_warning/test_warning.c b/test/addons-napi/test_warning/test_warning.c index a152ff84810d28..d0821be1f2268d 100644 --- a/test/addons-napi/test_warning/test_warning.c +++ b/test/addons-napi/test_warning/test_warning.c @@ -8,4 +8,4 @@ napi_value Init(napi_env env, napi_value exports) { return result; } -NAPI_MODULE(test_warning, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_warning/test_warning2.c b/test/addons-napi/test_warning/test_warning2.c index b35f9071c07ebb..3c8ee9db01390b 100644 --- a/test/addons-napi/test_warning/test_warning2.c +++ b/test/addons-napi/test_warning/test_warning2.c @@ -8,4 +8,4 @@ napi_value Init(napi_env env, napi_value exports) { return result; } -NAPI_MODULE(test_warning2, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) From a01b564add924592914d56043d60167ac917016e Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 13 Oct 2017 15:55:30 -0400 Subject: [PATCH 2/2] squash: address comments --- test/addons/callback-scope/binding.cc | 2 +- test/addons/dlopen-ping-pong/binding.cc | 2 +- test/addons/node-module-version/binding.cc | 2 +- test/addons/openssl-binding/binding.cc | 2 +- test/addons/zlib-binding/binding.cc | 2 +- test/gc/binding.cc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/addons/callback-scope/binding.cc b/test/addons/callback-scope/binding.cc index 22105360fbfe5c..f03d8a20d5333f 100644 --- a/test/addons/callback-scope/binding.cc +++ b/test/addons/callback-scope/binding.cc @@ -68,4 +68,4 @@ void Initialize(v8::Local exports) { } // namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/dlopen-ping-pong/binding.cc b/test/addons/dlopen-ping-pong/binding.cc index 14a817a13e8940..b35db4e708dd61 100644 --- a/test/addons/dlopen-ping-pong/binding.cc +++ b/test/addons/dlopen-ping-pong/binding.cc @@ -41,7 +41,7 @@ void init(Local exports) { NODE_SET_METHOD(exports, "ping", Ping); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) } // anonymous namespace diff --git a/test/addons/node-module-version/binding.cc b/test/addons/node-module-version/binding.cc index f46f0eb2c63645..3baafe23a477df 100644 --- a/test/addons/node-module-version/binding.cc +++ b/test/addons/node-module-version/binding.cc @@ -12,4 +12,4 @@ inline void Initialize(v8::Local exports, } -NODE_MODULE_CONTEXT_AWARE(binding, Initialize) +NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/openssl-binding/binding.cc b/test/addons/openssl-binding/binding.cc index 582a94478d26ca..fa40b3346a7a39 100644 --- a/test/addons/openssl-binding/binding.cc +++ b/test/addons/openssl-binding/binding.cc @@ -29,4 +29,4 @@ inline void Initialize(v8::Local exports, } // anonymous namespace -NODE_MODULE_CONTEXT_AWARE(binding, Initialize) +NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/zlib-binding/binding.cc b/test/addons/zlib-binding/binding.cc index 262f90bf0236e5..a9a8c14306c486 100644 --- a/test/addons/zlib-binding/binding.cc +++ b/test/addons/zlib-binding/binding.cc @@ -52,4 +52,4 @@ inline void Initialize(v8::Local exports, } // anonymous namespace -NODE_MODULE_CONTEXT_AWARE(binding, Initialize) +NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/gc/binding.cc b/test/gc/binding.cc index 197bb6a40a2988..8bde3b8505cf37 100644 --- a/test/gc/binding.cc +++ b/test/gc/binding.cc @@ -77,4 +77,4 @@ inline void Initialize(v8::Local exports, } // anonymous namespace -NODE_MODULE_CONTEXT_AWARE(binding, Initialize) +NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize)