Skip to content

Commit fcfde34

Browse files
legendecasjuanarbol
authored andcommittedJan 31, 2023
src: rename internal module declaration as internal bindings
This is a continuation of the name reification on the internal bindings. Renames NODE_MODULE_CONTEXT_AWARE_INTERNAL and NODE_MODULE_EXTERNAL_REFERENCE to NODE_BINDING_CONTEXT_AWARE_INTERNAL and NODE_BINDING_EXTERNAL_REFERENCE respectively. PR-URL: #45551 Backport-PR-URL: #46336 Refs: #44036 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 536322f commit fcfde34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+193
-189
lines changed
 

‎src/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ void Initialize(Local<Object> target,
419419
SetConstructorFunction(context, target, "ChannelWrap", channel_wrap);
420420
}
421421

422-
// Run the `Initialize` function when loading this module through
422+
// Run the `Initialize` function when loading this binding through
423423
// `internalBinding('cares_wrap')` in Node.js's built-in JavaScript code:
424-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize)
424+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(cares_wrap, Initialize)
425425
```
426426
427427
If the C++ binding is loaded during bootstrap, it needs to be registered
@@ -438,10 +438,10 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
438438
} // namespace util
439439
} // namespace node
440440
441-
// The first argument passed to `NODE_MODULE_EXTERNAL_REFERENCE`,
441+
// The first argument passed to `NODE_BINDING_EXTERNAL_REFERENCE`,
442442
// which is `util` here, needs to be added to the
443443
// `EXTERNAL_REFERENCE_BINDING_LIST_BASE` list in node_external_reference.h
444-
NODE_MODULE_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences)
444+
NODE_BINDING_EXTERNAL_REFERENCE(util, node::util::RegisterExternalReferences)
445445
```
446446

447447
Otherwise, you might see an error message like this when building the

‎src/async_wrap.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,6 @@ Local<Object> AsyncWrap::GetOwner(Environment* env, Local<Object> obj) {
709709

710710
} // namespace node
711711

712-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize)
713-
NODE_MODULE_EXTERNAL_REFERENCE(async_wrap,
714-
node::AsyncWrap::RegisterExternalReferences)
712+
NODE_BINDING_CONTEXT_AWARE_INTERNAL(async_wrap, node::AsyncWrap::Initialize)
713+
NODE_BINDING_EXTERNAL_REFERENCE(async_wrap,
714+
node::AsyncWrap::RegisterExternalReferences)

0 commit comments

Comments
 (0)
Please sign in to comment.