Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix up N-API doc #30254

Closed
wants to merge 2 commits into from
Closed

doc: fix up N-API doc #30254

wants to merge 2 commits into from

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Nov 4, 2019

  • 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-bot nodejs-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
Member Author

mhdawson commented Nov 4, 2019

@NickNaso let me know if I missed anything.

Copy link
Member

@NickNaso NickNaso left a comment

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
Member

NickNaso commented Nov 4, 2019

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

  • Signature for napi_create_reference in documentation is:
NAPI_EXTERN napi_status napi_create_reference(napi_env env,
                                              napi_value value,
                                              int initial_refcount,
                                              napi_ref* result);

instead it should be:

NAPI_EXTERN napi_status napi_create_reference(napi_env env,
                                              napi_value value,
                                              uint32_t initial_refcount,
                                              napi_ref* result);
  • Signature for napi_reference_ref in documentations is:
NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
                                           napi_ref ref,
                                           int* result);

instead it should be:

NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
                                           napi_ref ref,
                                           uint32_t* result);
  • Signature for napi_reference_unref in documentation is:
NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
                                             napi_ref ref,
                                             uint32_t* result);
  • Signature for napi_call_function in documentations is:
napi_status napi_call_function(napi_env env,
                               napi_value recv,
                               napi_value func,
                               int argc,
                               const napi_value* argv,
                               napi_value* result)

instead it should be:

NAPI_EXTERN napi_status napi_call_function(napi_env env,
                                           napi_value recv,
                                           napi_value func,
                                           size_t argc,
                                           const napi_value* argv,
                                           napi_value* result);
  • Signature for napi_make_callback in documentations is:
napi_status napi_make_callback(napi_env env,
                               napi_async_context async_context,
                               napi_value recv,
                               napi_value func,
                               int argc,
                               const napi_value* argv,
                               napi_value* result)

instead it should be:

NAPI_EXTERN napi_status napi_make_callback(napi_env env,
                                           napi_async_context async_context,
                                           napi_value recv,
                                           napi_value func,
                                           size_t argc,
                                           const napi_value* argv,
                                           napi_value* result);

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

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

RSLGTM

@mhdawson
Copy link
Member Author

mhdawson commented Nov 6, 2019

@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
Member Author

mhdawson commented Nov 6, 2019

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

@mhdawson
Copy link
Member Author

mhdawson commented Nov 6, 2019

@NickNaso addressed the rest of the comments

Copy link
Member

@NickNaso NickNaso left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson mhdawson 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
Member Author

mhdawson commented Nov 7, 2019

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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@trivikr
Copy link
Member

trivikr commented Nov 13, 2019

Landed in 1e0679e

@trivikr trivikr 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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@BridgeAR BridgeAR 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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@BethGriggs BethGriggs 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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
@mhdawson mhdawson deleted the napi-doc-vers branch September 14, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants