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: napi_create_range_error has incorrect prototype #20623

Closed
primeare opened this issue May 9, 2018 · 4 comments
Closed

doc: napi_create_range_error has incorrect prototype #20623

primeare opened this issue May 9, 2018 · 4 comments
Labels
doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.

Comments

@primeare
Copy link

primeare commented May 9, 2018

Function napi_create_range_error in documentation has prototype:

NODE_EXTERN napi_status napi_create_range_error(napi_env env,
                                                napi_value code,
                                                const char* msg,
                                                napi_value* result);

where msg has type const char*. But according to node_api.h the prototype should be:

NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
                                                napi_value code,
                                                napi_value msg,
                                                napi_value* result);

with msg having type napi_value.

@TimothyGu TimothyGu added doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API. labels May 9, 2018
@mhdawson
Copy link
Member

mhdawson commented May 9, 2018

Fixing.

mhdawson added a commit to mhdawson/io.js that referenced this issue May 9, 2018
@mhdawson
Copy link
Member

mhdawson commented May 9, 2018

PR with fix, #20641

@mhdawson
Copy link
Member

mhdawson commented May 9, 2018

@primeare thanks for reporting, I also fixed NODE_EXTERN->NAPI_EXTERN throughout the doc

@shobhitchittora
Copy link
Contributor

@mhdawson if fixed, can this issue be closed ? Thanks.

addaleax pushed a commit that referenced this issue May 14, 2018
Fixes: #20623

PR-URL: #20641
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

No branches or pull requests

4 participants