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

This comment has been minimized.

Copy link
Member Author

mhdawson commented Nov 4, 2019

@NickNaso let me know if I missed anything.

Copy link
Member

NickNaso left a comment

@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

This comment has been minimized.

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 left a comment

RSLGTM

@lpinca
lpinca approved these changes Nov 5, 2019
@mhdawson

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

mhdawson commented Nov 6, 2019

@NickNaso addressed the rest of the comments

Copy link
Member

NickNaso left a comment

LGTM

@mhdawson

This comment has been minimized.

Copy link
Member Author

mhdawson commented Nov 7, 2019

trivikr added 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

This comment has been minimized.

Copy link
Member

trivikr commented Nov 13, 2019

Landed in 1e0679e

@trivikr trivikr closed this Nov 13, 2019
Trott added a commit to Trott/io.js that referenced this pull request Nov 14, 2019
* Add missing N-API version info
* Fix N-API version info for napi_extended_error_info

PR-URL: nodejs#30254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
MylesBorins added 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>
@BridgeAR BridgeAR mentioned this pull request Nov 19, 2019
targos added 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>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins added 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>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.