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

n-api: fix napi_property_descriptor documentation #20433

Conversation

gabrielschulhof
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. dont-land-on-v4.x node-api Issues and PRs related to the Node-API. labels Apr 30, 2018
@vsemozhetbyt
Copy link
Contributor

FWIW, the last fix is also done here: #20430

@gabrielschulhof
Copy link
Contributor Author

@vsemozhetbyt whoops - I'll remove that part.

@gabrielschulhof gabrielschulhof force-pushed the 20421-fix-napi-property-descriptor branch from 393be56 to 9af5c4f Compare April 30, 2018 17:58
@gabrielschulhof
Copy link
Contributor Author

@vsemozhetbyt fixed.

@vsemozhetbyt
Copy link
Contributor

Node.js Collaborators, please, add 👍 here if you approve fast-tracking.

@vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt added the fast-track PRs that do not need to wait for 48 hours to land. label Apr 30, 2018
doc/api/n-api.md Outdated
@@ -957,7 +956,7 @@ To define a class so that new instances can be created (often used with
napi_value Init(napi_env env, napi_value exports) {
napi_status status;
napi_property_descriptor properties[] = {
{ "value", NULL, GetValue, SetValue, 0, napi_default, 0 },
{ "value", 0, 0, GetValue, SetValue, 0, napi_default, 0 },
Copy link
Member

Choose a reason for hiding this comment

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

I thought the suggestion was to use NULL instead of 0, just wondering why you went the other way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, right. I thought it would be more consistent, but you're right. This is plain C. I should actually use NULL everywhere – though that might expand the scope of the PR.

I'll add NULLs everywhere this PR touches, and do another sweep to make sure that the entire doc says NULL.

@gabrielschulhof gabrielschulhof force-pushed the 20421-fix-napi-property-descriptor branch from 9af5c4f to 72575f2 Compare May 4, 2018 15:22
@gabrielschulhof
Copy link
Contributor Author

@mhdawson I have updated the affected parts to show NULL wherever it's needed.

@BridgeAR
Copy link
Member

BridgeAR commented May 5, 2018

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 5, 2018
@gabrielschulhof
Copy link
Contributor Author

Landed in 4692cf4.

gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request May 6, 2018
PR-URL: nodejs#20433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@gabrielschulhof gabrielschulhof deleted the 20421-fix-napi-property-descriptor branch May 6, 2018 16:26
MylesBorins pushed a commit that referenced this pull request May 8, 2018
PR-URL: #20433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request May 8, 2018
MylesBorins pushed a commit that referenced this pull request May 8, 2018
PR-URL: #20433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 9, 2018
PR-URL: #20433
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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. fast-track PRs that do not need to wait for 48 hours to land. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants