doc: clarify that N-API addons are context-aware#36640
Closed
mildsunrise wants to merge 1 commit intonodejs:masterfrom
Closed
doc: clarify that N-API addons are context-aware#36640mildsunrise wants to merge 1 commit intonodejs:masterfrom
mildsunrise wants to merge 1 commit intonodejs:masterfrom
Conversation
The docs on N-API say that NAPI_MODULE_INIT must be used for the addon to be context-aware. That seems to be wrong, i.e. all N-API addons are context-aware(?)
addaleax
approved these changes
Dec 27, 2020
Trott
approved these changes
Dec 27, 2020
Member
|
@nodejs/n-api |
fhinkel
approved these changes
Dec 28, 2020
gabrielschulhof
requested changes
Dec 30, 2020
Contributor
gabrielschulhof
left a comment
There was a problem hiding this comment.
I'm blocking solely because many have already approved, and the change really should say NAPI_MODULE, not NODE_MODULE.
| If the module will be loaded multiple times during the lifetime of the Node.js | ||
| process, use the `NAPI_MODULE_INIT` macro to initialize the module: | ||
| You can also use the `NAPI_MODULE_INIT` macro, which acts as a shorthand | ||
| for `NODE_MODULE` and defining an `Init` function: |
Contributor
There was a problem hiding this comment.
Suggested change
| for `NODE_MODULE` and defining an `Init` function: | |
| for `NAPI_MODULE` and defining an `Init` function: |
Contributor
|
Otherwise, LGTM. |
mhdawson
approved these changes
Jan 4, 2021
Member
mhdawson
left a comment
There was a problem hiding this comment.
LGTM once @gabrielschulhof comment is addresssed.
Contributor
|
I think we can fix this as we land it. |
gabrielschulhof
approved these changes
Jan 5, 2021
Contributor
gabrielschulhof
left a comment
There was a problem hiding this comment.
Landing with the fix...
gabrielschulhof
pushed a commit
that referenced
this pull request
Jan 5, 2021
The docs on N-API say that NAPI_MODULE_INIT must be used for the addon to be context-aware. That seems to be wrong, i.e. all N-API addons are context-aware(?) PR-URL: #36640 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Contributor
|
Landed in a3fcf24. |
danielleadams
pushed a commit
that referenced
this pull request
Jan 12, 2021
The docs on N-API say that NAPI_MODULE_INIT must be used for the addon to be context-aware. That seems to be wrong, i.e. all N-API addons are context-aware(?) PR-URL: #36640 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Merged
targos
pushed a commit
that referenced
this pull request
May 1, 2021
The docs on N-API say that NAPI_MODULE_INIT must be used for the addon to be context-aware. That seems to be wrong, i.e. all N-API addons are context-aware(?) PR-URL: #36640 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docs on N-API say that NAPI_MODULE_INIT must be used for the addon to be context-aware. That seems to be wrong, i.e. all N-API addons are context-aware(?)