-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
n-api: fix napi_property_descriptor documentation #20433
Conversation
FWIW, the last fix is also done here: #20430 |
@vsemozhetbyt whoops - I'll remove that part. |
393be56
to
9af5c4f
Compare
@vsemozhetbyt fixed. |
Node.js Collaborators, please, add 👍 here if you approve fast-tracking. |
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 }, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 NULL
s everywhere this PR touches, and do another sweep to make sure that the entire doc says NULL
.
9af5c4f
to
72575f2
Compare
@mhdawson I have updated the affected parts to show |
Landed in 4692cf4. |
PR-URL: nodejs#20433 Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #20433 Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #20433 Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #20433 Reviewed-By: Colin Ihrig <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes