Skip to content

doc: fix up N-API doc - #30254

Closed
mhdawson wants to merge 2 commits into
nodejs:masterfrom
mhdawson:napi-doc-vers
Closed

doc: fix up N-API doc#30254
mhdawson wants to merge 2 commits into
nodejs:masterfrom
mhdawson:napi-doc-vers

Conversation

@mhdawson

Copy link
Copy Markdown
Member
  • Add missing N-API version info
  • Fix N-API version info for napi_extended_error_info
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info
@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API. labels Nov 4, 2019
@mhdawson

Copy link
Copy Markdown
MemberAuthor

@NickNaso let me know if I missed anything.

@NickNasoNickNaso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhdawson I think that you missed only napi_add_finalizer it's added in Node.js version 8.0.0 but it's promoted as stable in N-API version 5.

@NickNaso

Copy link
Copy Markdown
Member

@mhdawson I found some other inconsistencies that I report below:

  • Signature for napi_create_reference in documentation is:
NAPI_EXTERNnapi_statusnapi_create_reference(napi_envenv,
napi_valuevalue,
intinitial_refcount,
napi_ref*result);

instead it should be:

NAPI_EXTERNnapi_statusnapi_create_reference(napi_envenv,
napi_valuevalue,
uint32_tinitial_refcount,
napi_ref*result);
  • Signature for napi_reference_ref in documentations is:
NAPI_EXTERNnapi_statusnapi_reference_ref(napi_envenv,
napi_refref,
int*result);

instead it should be:

NAPI_EXTERNnapi_statusnapi_reference_ref(napi_envenv,
napi_refref,
uint32_t*result);
  • Signature for napi_reference_unref in documentation is:
NAPI_EXTERNnapi_statusnapi_reference_unref(napi_envenv,
napi_refref,
uint32_t*result);
  • Signature for napi_call_function in documentations is:
napi_statusnapi_call_function(napi_envenv,
napi_valuerecv,
napi_valuefunc,
intargc,
constnapi_value*argv,
napi_value*result)

instead it should be:

NAPI_EXTERNnapi_statusnapi_call_function(napi_envenv,
napi_valuerecv,
napi_valuefunc,
size_targc,
constnapi_value*argv,
napi_value*result);
  • Signature for napi_make_callback in documentations is:
napi_statusnapi_make_callback(napi_envenv,
napi_async_contextasync_context,
napi_valuerecv,
napi_valuefunc,
intargc,
constnapi_value*argv,
napi_value*result)

instead it should be:

NAPI_EXTERNnapi_statusnapi_make_callback(napi_envenv,
napi_async_contextasync_context,
napi_valuerecv,
napi_valuefunc,
size_targc,
constnapi_value*argv,
napi_value*result);

I think that we could avoid to open other PR and handle the necessary changes in this one.

@BridgeARBridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RSLGTM

@mhdawson

mhdawson commented Nov 6, 2019

Copy link
Copy Markdown
MemberAuthor

@NickNaso thanks I'll look at the non-version related inconsistencies separately.

EDIT, I see the comment above, will integrate into this PR.

@mhdawson

Copy link
Copy Markdown
MemberAuthor

@NickNaso napi_add_finalizer was already tagged as version 5 that is why it does not show up in the diffs.

@mhdawson

Copy link
Copy Markdown
MemberAuthor

@NickNaso addressed the rest of the comments

@NickNasoNickNaso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawsonmhdawson added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 7, 2019
@mhdawson

Copy link
Copy Markdown
MemberAuthor

trivikr pushed a commit that referenced this pull request Nov 13, 2019
* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info
PR-URL: #30254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@trivikr

Copy link
Copy Markdown
Member

Landed in 1e0679e

@trivikrtrivikr closed this Nov 13, 2019
MylesBorins pushed a commit that referenced this pull request Nov 17, 2019
* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info
PR-URL: #30254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@BridgeARBridgeAR mentioned this pull request Nov 19, 2019
targos pushed a commit that referenced this pull request Dec 1, 2019
* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info
PR-URL: #30254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@BethGriggsBethGriggs mentioned this pull request Dec 9, 2019
MylesBorins pushed a commit that referenced this pull request Dec 17, 2019
* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info
PR-URL: #30254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@BethGriggsBethGriggs mentioned this pull request Dec 23, 2019
@mhdawson
mhdawson deleted the napi-doc-vers branch September 14, 2020 21:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.docIssues and PRs related to the documentations.node-apiIssues and PRs related to the Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@mhdawson@NickNaso@trivikr@lpinca@gengjiawen@BridgeAR@nodejs-github-bot