-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 out of date napi_callback doc #13570
Conversation
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. Fixes: nodejs#12248
cc/ @nodejs/n-api |
@@ -172,7 +172,7 @@ Function pointer type for user-provided native functions which are to be | |||
exposed to JavaScript via N-API. Callback functions should satisfy the | |||
following signature: | |||
```C | |||
typedef void (*napi_callback)(napi_env, napi_callback_info); | |||
typedef napi_value (*napi_callback)(napi_env, napi_callback_info); |
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.
Please also update the section above about napi_callback_info
: it is no longer used to set the return value.
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.
done. 👌 @jasongin
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. PR-URL: #13570 Fixes: #12248 Fixes: #13562 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in ca8a29c |
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. PR-URL: #13570 Fixes: #12248 Fixes: #13562 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: James M Snell <[email protected]>
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. PR-URL: #13570 Fixes: #12248 Fixes: #13562 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: James M Snell <[email protected]>
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. PR-URL: nodejs#13570 Fixes: nodejs#12248 Fixes: nodejs#13562 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: James M Snell <[email protected]>
The earlier version `napi_callback` returns `void` but now is `napi_value`. The document of this section hasn't been modified. Backport-PR-URL: #19447 PR-URL: #13570 Fixes: #12248 Fixes: #13562 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: James M Snell <[email protected]>
The earlier version
napi_callback
returnsvoid
but now isnapi_value
. The document of this section hasn't been modified.Fixes: #12248
Fixes: #13562
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc, n-api